[Javascript] 정리2
Math.~ Math .max() 최댓값 .min() 최솟값 .round() 반올림 .floor() 내림 .ceil() 올림 .random() 난수 생성 ex> Math.floor(Math.random() * 11) -3 -3부터 7까지 Date().~ var newd = new Date() .getMonth() 현재 달 .getDate() 현재 일 .getDay() 현재 요일 new Date(연도, 월, 일, 시, 분, 초, ms) 월의 경우 index counting이라 0~11까지이다. new Date(2022, 6, 8, 0, 12, 33) new Date("June 8, 2022 12:34:56" 기타 .toFixed() num1.toFixed(2) num1의 소숫점 두번째 자리까지만 표기 .t..
2022. 12. 27.