O'Reilly logo

Modern JavaScript: Develop and Design by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4. Simple Variable Types

All programming comes down to taking some action with some data. In this chapter, the focus is on the data side of the equation, represented by variables. Even if you’ve never done any programming, you’re probably familiar with the concept of a variable: a temporary storage container. This chapter starts with the basics of variables in JavaScript, and then covers number, string, and Boolean variables. Along the way you’ll find plenty of real-world code, representing some of the actions you will take with these simple variable types.

Basics of Variables

I think it’s easiest to grasp variables by starting with so-called “simple” variables, also called “primitive” variable types. By simple, I mean variables that only store ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required