There are three ways to declaring Variables in JavaScript.
Variables are like containers that hold a set of value(s), be it string, boolean, array, numbers or objects.
Because JavaScript is a loosely-typed programming language, specifying the value to be declared in a variable is not needed.
The three ways to declare variables in JavaScript are: var, let and const.
const is used to declare variables that their values are not likely to change during the code runtime.
let and var, with some signifiant difference, are used to declare variables whose values are very likely to change over the course of a code runtime.
Top comments (0)