You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. var - It has function level access i.e. once declared inside a function it can be accessed anywhere inside that function. Also we can redeclare a variable with same name as declared earlier using var.
2. let - it has block level access and can not be accessed outside the block. Also we can not redeclare it inside the same block (if new block is created we can do so but it will have local access). let is same as variable type in C++.
3. const - to keep something constant i.e. once declared can not be changed