O'Reilly logo

Web Programming with HTML5, CSS, and JavaScript by Dean

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

9.9 Strings

You’ve been using strings for quite a while now, but you’ve been using them in a bare-bones fashion. In this section, you’ll learn about some of the functionality that JavaScript provides to make working with strings easier. That added functionality is particularly important because strings are used so often for processing user input. In this section, you’ll learn about string operators, hard-to-represent string characters (such as the quote character), and also string methods.

Comparison Operators

In the improved Game Night web page, remember the following prompt for the user’s name and the if statement that verifies that the user entered something?

 var name; // user's name name = prompt("What's your name?"); if (name != null) ...

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