Understand JavaScript Variables In Depth
Variables are named memory locations. When we declare a variable in JavaScript, it means that a memory location is allocated to store some value and that location can be accessed using the variable name.
Here is an example of a variable declaration.
var name;
Here name
is pointing towards some memory location in RAM. One of the ways to store…