In the sequence()
function, array properties are accessed using bracket notation, and stored in variables.
These variables are then returned.
Using "Destructuring", can you refactor the code sequence()
function so it uses less code?
To run the tests:
npm test destructuring_arrays.test.js
Hint: make sure you're in the correct folder before running this command