Waterdroplets on a spiderweb against a green background

Strings are one of the key data types in JavaScript: anything that has text as a value (or is interpreted as text) is a string. Strings are common in forms, but are encountered when dealing with any kind of text information: the name of a class, for example, is a string, as is the content of a text node.

As such, manipulating and changing strings is very common in JavaScript. This reading list is a starting point for the most common methods for strings, although there are may more methods than those shown here, and the reading list will grow over time.

Prerequisites: Operands and Operators

Time: 40 minutes

  1. Strings
  2. Uppercase, lowercase & capitalisation
  3. Concatenation
  4. Template Literals
  5. split & slice
  6. trim

Illustration by Susanne Nilsson, used under a Creative Commons Attribution-ShareAlike 2.0 Generic license.

Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.