JavaScript let

JavaScript let


JavaScript Let
  • Let is a block level variable.
  • Let allow you to declares variables that are limited in scope to the block, statement, or expression.
  • Using var we can define a variable either globally, or locally to entire function regardless of clock scope.
  • Let doesn’t allow duplicate variable creation.
Using let keyword in another example, ab, and c, are variables is as follows: 
Example
Output