Chapter 3. Data Structures and Manipulation

Most of the time that you spend in programming, you do something to manipulate data. You process properties of data, derive conclusions based on the data, and change the nature of the data. In this chapter, we will take an exhaustive look at various data structures and data manipulation techniques in JavaScript. With the correct usage of these expressive constructs, your programs will be correct, concise, easy to read, and most probably faster. This will be explained with the help of the following topics:

  • Regular expressions
  • Exact match
  • Match from a class of characters
  • Repeated occurrences
  • Beginning and end
  • Backreferences
  • Greedy and lazy quantifiers
  • Arrays
  • Maps
  • Sets
  • A matter of style

Regular expressions

If you are ...

Get Mastering JavaScript now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.