JavaScript
📚 Arrays and their methods
Ordered lists of data: creation, access, modification and the powerful functional methods.
What you'll learn
- Create arrays and access their elements by index using
lengthto locate the last one. - Modify arrays with
push,pop,shift,unshift,sliceandsplice, distinguishing which ones mutate the original. - Search for elements with
includesandindexOfto check membership and position. - Transform a collection by chaining
map,filterandreduce, and sort numbers withsortand a comparison function.
Lessons
Creating arrays, indices and lengthOrdered lists and how to access their elements. Adding, removing and slicingpush, pop, shift, unshift, slice and splice. Searching for elementsindexOf and includes. Functional methods: map, filter, reduce and moreTransform, filter and summarize arrays elegantly.Practice this module in the app
DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.
Start free in the app →