TSTajinder Singhintajinder.hashnode.dev·Jun 4, 2022 · 2 min readClosureWhat is Closure? According to MDN, a closure is a combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In short, a closure gives you access to an outer function's scope from an inne...00
TSTajinder Singhintajinder.hashnode.dev·Jun 4, 2022 · 4 min readHoisting and TDZBefore getting to hoisting and TDZ let's have a look at a simple Example: var age = 30; function getName(){ console.log("Bruce Wayne"); } getName(); console.log(age); There's nothing new in this example just a variable (age) and a function (getName...00
TSTajinder Singhintajinder.hashnode.dev·Jun 4, 2022 · 3 min readvar, let and constBefore the release of ES2015 (ES6), Javascript variables were only declared using var keyword. However, with the introduction of ES6, new ways to declare variables using let and const were introduced. This Blog will help you know the difference bet...01A