© Russ Ferguson 2019
Russ FergusonBeginning JavaScripthttps://doi.org/10.1007/978-1-4842-4395-4_4

4. JavaScript Objects and Arrays

Russ Ferguson1 
(1)
Ocean, NJ, USA
 

The last chapter introduced variables. Using variables, you can save information to use later. As applications become more complex, the ability to remember user settings, URLs, or the contents of a form becomes more important.

One of the problems that you run into with a variable is, no matter the type, you can only hold onto one piece of information at a time. If you assign a new value to a variable, the original value is gone. This prevents you from holding onto complex types of data.

It is also not reasonable to create a large number of variables for the purpose of simulating something ...

Get Beginning JavaScript: The Ultimate Guide to Modern JavaScript Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.