In this lab, we are going to practice array operations.
- Perform operations on arrays as guided by tests
- Reflect on approach
- Find the highest number in a given array
- Find Nemo in a nested array
- Flatten a nested array
- Flatten a nested array, then return the array alphabetically sorted
Did you use the methods that were built-in to the Enumerable and Array classes? Why not? Knowing your built ins saves you time, prevents bugs, and is what other developers will expect to see you use when writing clear and concise code in the future. By using these, you will prevent errors and ensure that your code is as clear as possible. That way, when you go back to it in the future, you're not creating technical debt for yourself or other developers, and you're ensuring that your code is easy to maintain and improve.
There are many varied and fun ways that you can manipulate arrays to make data work for you. As long as you focus on working with the built in methods first, the sky's the limit!