Module 9 · Arrays
Passing an Array to a Function
Free with an accountReading
Amara's teacher may double every mark as a bonus. Bob wants a preview, so he writes a function that doubles each mark and prints it.
Sign in to read
This lesson is free, with an account
An account costs nothing and opens every lesson in this track that is not marked Pro, on every device you read on.
What is inside Passing an Array to a Function
- Bob's preview changed the real marks
- The function gets where the boxes are
- Two parameters: the array and its count
- The size does not travel
- Filling an array and returning a count
- const: a promise not to change the boxes
- A grid needs its column count
- Memoisation: a recursion that remembers