Friday , September 20 2024

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:

Questions BankCategory: JavaScript Essentials 1We 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:
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