Variable / Hoisting / Data Type
1. Use Strict : 엄격 모드
//Use strict!
//added in ES 5
//use this for Vanilla Javascript
'use strict';2. Variable : 변수, 변경될 수 있는 값
//let (added in ES6)
let name = 'ellie';
console.log(name); //ellie
name = 'hello';
console.log(name); //hello2-1. Block scope / global scope
2-2. var를 사용하면 안 되는 이유
3. Constant : 상수, 한 번 할당하면 값이 절대 바뀌지 않음
" Favor Immutable Data type Always "
4. Variable types : 데이터 타입
5. Dynamic typing (동적타이핑, Dynamically typed language)
Last updated