data privacy
-
let, const, block scope, function scope and IIFEsDynamicPL/Javascript 2019. 10. 24. 15:05
1. Overview Variables declared with var in ES5 are function-scoped and Variables declared with let and const in ES6 are block-scoped. 2. Description 2.1 Function-scoped Variables, which declared var, are only accessible inside of a function, but not from the outside. And we would use a variable before the declaration, it would be an "undefined" cause of hoisting. function driversLicence5(passedT..