This JavaScript Arrays module is designed to provide a comprehensive introduction to arrays, a fundamental list datatype in programming. The module concludes with an extended practical exercise where learners will create, modify, and iterate through an array of strings. This content is suitable for beginners who are relatively new to JavaScript programming.
| Lesson | Skills |
|---|---|
| Setup | Setting up the development environment |
| Concepts | Arrays as a datatype: properties, what they can hold, and use-cases |
| Fundamentals | Creating arrays, syntax, and naming conventions |
| Reading | Accessing array elements using index and length property |
| Manipulation | Updating and manipulating arrays with methods like push() and pop() |
| Iteration | Iterating through arrays using for and for...of loops |
forEach() |
Iterating through arrays using forEach(), callback functions, anonymous functions, and index parameter. |
join() |
Combining all of the elements in an array into a single string with join() |
| You Do | Practice creating, modifying, and iterating through an array of strings. |
at() |
Using at() method for array element access with positive and negative indexes |
shift() and unshift() |
Adding and removing elements at array start with unshift() and shift() methods |
Expanding on forEach() |
Advanced forEach() usage: named functions, scope management, and loop limitations |
break and continue |
Using break and continue in loop control |
| Copying Arrays | Copying arrays using spread syntax and slice() |
| Shallow vs. Deep Copies of Arrays | Shallow vs. deep copies, using JSON.stringify() and structuredClone() |
- Intro to JavaScript
- JavaScript Control Flow
- Intro to JavaScript Functions
Find a 👾 bug 👾 or have suggestions? Let us know!