getMilliseconds() returns the milliseconds (0 to 999) of a date. 현재의 밀리세컨드를 반환 getMilliseconds() 메서드는 Date 인스턴스의 밀리초를 현지 시간 기준으로 반환합니다. getTime() returns the number of milliseconds since January 1, 1970 00:00:00. : 1970-01-01 부터의 밀리세컨드값을 반환 1970 년 1 월 1 일 00:00:00 UTC와 주어진 날짜 사이의 경과 시간 (밀리 초)을 나타내는 숫자입니다. * https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Date/getTim..
Date.getTime()으로 날짜/시간 비교 Date.getTime()는 UTC 시간을 millisecond로 리턴합니다. UTC는 1970/01/01를 0초로 지금까지 흐른 시간을 표현한 것입니다. millisecond이기 때문에 비교 연산자를 이용하여 크기를 비교할 수 있고, 또한 동등 연산자로 비교할 수도 있습니다. const date1 = new Date('2022-05-04'); const date2 = new Date('2022-05-05'); console.log('date1: ' + date1.getTime()); console.log('date2: ' + date2.getTime()); console.log(date1.getTime() > date2.getTime()); console...
each()문을 써야하는 이유는 무엇일까 특징을 살펴보자? 1. 일반 for문보다 가독성이 좋다 2. 객체형을 다루기가 쉽다. 3. Array 객체에서 사용가능 4. 빠른편이다. 5. 리턴값을 받지 못한다. for, foreach, each var arr= [ {name : '알리송', backnumber : '1'} , {name : '반다이크', backnumber : '4'} ]; //for문 for (var i = 0; i
ES6 for beginners https://hackernoon.com/es6-for-beginners-f98120b57414 ES6 for beginners | HackerNoon hackernoon.com Topics I’m gonna cover in this post Let and Const Arrow functions Default parameters for of loop Spread attributes Maps Sets Static methods Getters and Setters ES6 문법 + 활용 패턴 살펴보기 https://chancethecoder.tistory.com/30 블록 범위 생성자 (Block-Scoped Constructs Let and Const) 화살표 함수 (Arro..
getDay() 메서드는 지정된 날짜의 요일(0~6)을 반환합니다. var d = new Date(); var n = d.getDay(); getDay() 메서드는 지정된 날짜의 요일(0~6)을 반환합니다. 참고: 일요일은 0, 월요일은 1 등입니다. var d = new Date(); var weekday = new Array(7); weekday[0] = "Sunday"; weekday[1] = "Monday"; weekday[2] = "Tuesday"; weekday[3] = "Wednesday"; weekday[4] = "Thursday"; weekday[5] = "Friday"; weekday[6] = "Saturday"; var n = weekday[d.getDay()]; https://www..
three.js JavaScript 3D library The aim of the project is to create an easy to use, lightweight, cross-browser, general purpose 3D library. The current builds only include a WebGL renderer but WebGPU (experimental), SVG and CSS3D renderers are also available in the examples. github.com/mrdoob/three.js/releases Releases · mrdoob/three.js JavaScript 3D library. Contribute to mrdoob/three.js develop..