Nowadays JavaScript has three different keywords to declare a variable — var, let and, const. Each has its own properties and particularities. Let’s start by making a simple comparison table of the ...
i.e. intuitively it looks like the variable will only be available within the block but it is accessible outside the block .. in javascript's case, because var doesn't make a block level declaration.
The Dilemma of Context Binding One of the most notable features of arrow functions is that they do not bind their own this; instead, they inherit the this value from the outer scope. This can simplify ...