ES6 provides the true
block scope binding using
Let keyword.
let allows us to declare variables that are limited in scope to the block, statement, or expression on which it is used.variable declared in
var keyword are global or local to an entire function regardless of block scope.In this
demo, “
We will learn to use true block scope binding using let keyword”.We are using the
same project that we have used in my
previous post.The following code has 2 different method
printIUsingVar() and
print...
Published on February 22, 2015 08:20