Header Ads Widget

Responsive Advertisement

type of variable

Type of variable to store value in variable:
1: var
2: let
3: const

Let vs const
Let: mutated  later it can be changed (function scope). The let value only limit to the block of code so if we change a pet value it only changes inside the block of code.

Var: it is a global scope and works everywhere.


Const: the assigned value can not be changed


Post a Comment

0 Comments