in JavaScript by
Q:
What is let and const in javascript?

1 Answer

0 votes
by

In modern javascript let & const are different ways of creating variables. Earlier in javascript, we use the var keyword for creating variables. let & const keyword is introduced in version ES6 with the vision of creating two different types of variables in javascript one is immutable and other is mutable.
const: It is used to create an immutable variable. Immutable variables are variables whose value is never changed in the complete life cycle of the program.
let: let is used to create a mutable variable. Mutable variables are normal variables like var that can be changed any number of time.

Click here to read more about JavaScript
Click here to read more about Insurance

Related questions

+1 vote
asked Jul 16, 2019 in JavaScript by Indian
+1 vote
asked Jul 16, 2019 in JavaScript by Indian
+1 vote
+1 vote
+1 vote
asked Jul 16, 2019 in JavaScript by Indian
+1 vote
asked Dec 4, 2019 in JavaScript by SakshiSharma
0 votes
asked Jun 16, 2019 in JAVA by reins.robin
...