[12/13] DAY9 자바스크립트 공부
·
기타/[JS-0기] 한입 FE 챌린지
9일 차 진도 Date 객체 특정 날짜의 시간과 현재 날짜와 시간을 알 수 있다. let nowDate = new Date(); console.log(nowDate); // 2023-12-13T00:50:37.026Z 오늘의 연도 월, 일 시간이 출력된다. Date 객체의 메서드 getMonth(월), getDate(일), getDay(요일) let nowDate = new Date(); let month = nowDate.getMonth(); let date = nowDate.getDate(); let day = nowDate.getDay(); console.log(`${month}월 ${date}일 ${day}요일`) // 11월 13일 3요일 getMonth 메서드는 월을 0~11 사이의 숫자로 표..