Level 2 · Core Development
Module 6: Arrays and Collections
Creating and accessing arrays
Create arrays with literals, read and change elements by index, use length and at(), and explain why arrays start at index 0.
Lesson 27
Adding and removing elements
Add and remove elements with push, pop, unshift, shift and splice, copy parts with slice and concat, and tell mutating methods from non-mutating ones.
Lesson 28
Searching and sorting arrays
Search arrays with includes, indexOf, find and findIndex, sort strings and numbers correctly with compare functions, and avoid sorting shared data in place.
Lesson 29
Iterating over collections
Iterate arrays with for, for...of, entries() and forEach, choose the right loop for the task, and iterate strings and arrays of objects.
Lesson 30
Building collection-based applications
Build a collection-based application: keep state in an array of objects, write functions that add, update, remove and summarise items, and test each operation.
Module mastery assessment
Eight questions and a practical task covering Lessons 26 to 30: creating and accessing arrays, adding and removing items, searching, sorting and iterating.