Variables1 #1~2 console.log('Hello World'); & 데이터타입, data types, let vs var, hoisting (with 드림코딩) #1 console 창에 'Hello World'를 출력하기 main.js 를 만들어서 console.log('Hello World'); 를 치면 아래 사진처럼 출력한다. script aysnc vs defer 결론: defer을 써라 'use strict'; es5에 추가되었고 Js는 유연하기 때문에 그만큼 위험하다. 그래서 'use strict';를 써줌으로써 위험을 막는다. #2 1) variable 변수를 만들 때는 let을 사용한다. ex) let name = 'kim'; 'kim'이란 변수의 값을 name이란 이름에 할당한 것이다. 값은 다시 할당할 수 있다. 2) Block scope { let name = 'kim' console.log(name); name = 'hello'; consol.. 2021. 7. 21. 이전 1 다음 728x90