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

Get HTML, CSS and JavaScript All in One, Sams Teach Yourself: Covering HTML5, CSS3, and jQuery, 2nd Edition 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.