Exercise - Working with Arrays and Objects
In the start point there are three files containing some exercises. For each exercise:
Read the instructions carefully!
If there is a variable declared (eg.
someVariable = null
) replace thenull
with the value being asked for.Uncomment the
console.log()
call to check your solution.Run the file using Node.
Re-comment the
console.log()
(if you like) to make it easier to read the output of the next question.Don't comment out the code for completed questions! If you do it might affect a later exercise.
Some of these exercises wcan be done using the methods we covered in class, some will need you to look up the documention (here for Arrays, here for Objects), some will need both!
Before you start you should copy the files to a new directory and initialise a Git repository there. Make a commit after each exercise you complete and make sure to push to GitHub when you're done!
Last updated
Was this helpful?