• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Working with Strings

We’ve been introduced to the various data types in JavaScript now, and one of them bears more investigation here: strings. There’s more to this data type than meets the eye in JavaScript, and it’s a good idea to understand this data type now, because we’ll be seeing it throughout the book.

When you assign a string value to a variable, that string is just treated as a literal value, and stored as a string literal, which means that just the actual characters making up the text are stored in the variable:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint