O'Reilly logo

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond by JD Isaacks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 9. New array methods

After reading lesson 9, you will

  • Know how to construct arrays with Array.from
  • Know how to construct arrays with Array.of
  • Know how to construct arrays with Array.prototype.fill
  • Know how to search in Arrays with Array.prototype.includes
  • Know how to search in Arrays with Array.prototype.find

Arrays are probably the most common data structure used in JavaScript. We use them to hold all kinds of data, but sometimes getting the data we want into or out of the array isn’t as easy as it should be. But those tasks just got a lot easier with some of the new array methods that we’ll cover in this lesson.

Consider this

Consider this snippet of jQuery code that grabs all the DOM nodes with a specific CSS class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required