To help remind yourself of things you've learned, never hesitate to incorporate cheat sheets into your programming journey. They're a great tool for picking up new methods and refreshing yourself on tricks you already know.
If you're brand new to coding and looking to dip your toes into computer science before you dive into arrays, the CS50 Data Structure Lecture should be at the top of your watch list.
CS50 is an introductory Computer Science course at Harvard university taught by David J. Malan. The video offers a foundational premise of the intellectual enterprises of computer science and the art of programming, with energy, depth, and clarity.
Next up are JS mutable methods. Mutable methods mutate the original object once implemented. Hint: If you find yourself getting mutable and immutable mixed up, just remember that mutable = mutates.
To help keep these straight, Aaron Yu mapped out 9 mutating methods for arrays and separated them into four categories:
- Methods that return a modified array in place
- Methods that return a value
- Methods that return the new length of the array
Throughout his guide, Yu gives supportive examples of each method mentioned. Below, you’ll find Yu’s guide to non-mutating methods.
A non-mutating (or immutable) method is a method that does not change or alter the object after using the said method. This guide will help you identify methods that accept arguments and callback functions and which methods that will not accept arguments.
flatMap() has a lower browser usability score than join().
A link to an in-depth browser usability report is provided for each function by clicks on the score icon.
Hint: slice() is immutable while splice() is mutable.