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.
Posted Date:- 2021-10-08 09:58:12
what is meant by Class Expressions?
What is difference between CoffeeScript and es6 ?
What is difference between ES6 and typescript?
What is Prototypal Inheritance in Javascript?
What is the use of let & const in JavaScript?
How to create a Javascript class in ES6?
Explain Destructuring Assignment in ES6?
What are the classes and proxies?
What is spread, default and rest parameter?
Explain the reason for using ES6 classes.
Explain the motivation behind Symbols to ES6.
Explain Internationalization and Localization.