We have declared an array of animals let animals = [“dog”, “cat”, “hamster”];. Then we call the method animals.push(“canary”);. As a result, the animals array will look like this:
- [“canary”, “dog”, “cat”, “hamster”]
- [“dog”, “cat”, “hamster”]
- [“dog”, “cat”, “hamster”, “canary”]
- [“canary”]
More Questions: JavaScript Essentials 1 – JSE1: Module 2 Test
Please login or Register to submit your answer