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 ...

Get Sams Teach Yourself HTML, CSS and JavaScript All in One now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.