Chapter 7: Stringing Characters Together
Learning Objectives
- Understand strings, like arrays, are indexed collections
- Index into a string using bracket notation
- Describe what it means for strings to be immutable
- Find the length of a string using the
.length
method - Create strings with special characters: \n, \t, unicode (e.g. ‘\u03a9’)
- Include quotes with strings by escaping them
- Use template literals to create strings that rely on variable values
- Use common string methods:
indexOf
, charAt
, toLowerCase
, toUpperCase
, trim
, replace
, slice
- Understand how ASCII allows characters to be represented as numbers
- Convert characters from string to ASCII codes and back using charCodeAt and String.fromCharCode
Key Terminology
- collection
- character
- template literal
- bracket notation
- ASCII
- Unicode
- object
- property
- method
Content Links