Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Frontend
→
Advanced JavaScript Interview Questions in Frontend
→
What is the difference between let, var & const?
1.
What is the difference between let, var & const?
Answer»
Let
Var
Const
Let variables can be updated within its scope.
Var variables can be updated.
The
VALUE
of const is cannot be updated.
Redeclaration is possible within its scope.
Redeclaration is possible.
Redeclaration is not possible.
For example:
jeepName ="Saab";
let carName="Ford";
For example:
jeepName = "Ford";
var jeepName;
For example:
const
JEEP
= {type:"Open",
MODEL
:"700",
COLOR
:"
BLACK
"};
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
How to calculate the Fibonacci series in JavaScript?
Why is the "this" operator inconsistent In JavaScript?
How to "deep-freeze" an object in JavaScript?
Is JavaScript as Pass by value or pass by reference language?
What do you mean by the Temporal Dead Zone in ES6?
What is the drawback of creating a true private in JavaScript?
What is a generator in JavaScript and when to use it?
Give an example and explain the main difference between ES6 class and ES5 function constructors?
What is the use of the Weakmap object in JavaScript?
What is asynchronous programming and why is it important in JavaScript?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies