O'Reilly logo

Sams Teach Yourself HTML, CSS and JavaScript All in One by Julie C. Meloni

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

Chapter 16. Using JavaScript Variables, Strings, and Arrays

WHAT YOU’LL LEARN IN THIS CHAPTER:

• How to name and declare variables

• How to choose whether to use local or global variables

• How to assign values to variables

• How to convert between different data types

• How to use variables and literals in expressions

• How strings are stored in String objects

• How to create and use String objects

• How to create and use arrays of numbers and strings

Now that you have learned some of the fundamentals of JavaScript and the DOM, it’s time to dig into more details of the JavaScript language.

In this chapter, you’ll learn three tools for storing data in JavaScript: variables, which store numbers or text; strings, which are special variables ...

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