Introduction
Explore arrays as versatile data collections in JavaScript. Understand how to use includes and spread operator syntax to write flexible, readable code while minimizing bugs. This lesson helps you master array basics and prepares you for more advanced usage.
We'll cover the following...
The ancient Greek poet Archilochus wrote, “A fox knows many things, but a hedgehog one important thing.” The great historian Isaiah Berlin said all thinkers are either hedgehogs or foxes. I think the same is true of syntax.
As you’ve seen, const is a hedgehog. It can only do one thing—make an unchanging
declaration. By only doing one thing, it makes your code readable
and predictable. As you’ll see in upcoming tips, array methods are all hedgehogs.
They can do only one thing on an array. But they do it well, so you can
safely predict outcomes without diving into the details. ...