Where are JavaScript variables stored?


Like many other programming languages, JavaScript has variables. Variables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container.

JavaScript variables get stored in the memory of the browser process. The following ways can work for storing variables:

  • The variables which you declare in your JavaScript code gets saved in the memory of the browser process.
  • Cookies can also store variables, they are often saved on your hard disk;

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 07-Jan-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements