Work with strings: 12 levels of slice, split, replace, regex match and template literals. A JavaScript string manipulation game for mastering text.
.toUpperCase() returns a new string with all the letters changed to capital. The original string doesn't change.
.trim() removes the whitespace at the start and end of a string. Spaces in the middle stay. Methods can be chained.
.includes(searchString) returns true if the string contains searchString, false if not. It's case-sensitive.
.startsWith(prefix) returns true if the string starts with prefix. .endsWith(suffix) checks the suffix.
.slice(start, end) takes a part of the string. start is the starting position (from 0), end is the ending position (not included).
.indexOf(searchString) returns the first position where searchString is found (from 0). It returns -1 if not found.