December 2014
Intermediate to advanced
272 pages
8h 17m
English
The String object is by far the most commonly used object in JavaScript. JavaScript automatically creates a String object for you anytime you define a variable that has a string data type. For example:
var myStr = "Teach Yourself jQuery & JavaScript in 24 Hours";
When you create a string, there are a few special characters that you can’t add directly to the string. For those characters, JavaScript provides a set of escape codes, listed in Table 1.5.
Table 1.5 String Object Escape Codes
To determine the length of a string, you can use the length property of the String object, as in this example: ...
Read now
Unlock full access