hoisting
-
2. data types, let vs var, hoistingJavaScript & TypeScript 2020. 11. 13. 17:21
1. let vs var, hoisting Variable, rw(read/write) let (added in ES6) scope global scope block scope Var var (don't ever ues this) var hoisting (move declaration from bottom to top) has no block scope block scope ignore Constant, r (read only) favor immutable data type always for a few reasons security thread safety reduce human mistakes 2. data types Variable types primitive, single item number s..