Owl Array

The push() Method

Your task is to add the string 'compass' to the end of the array 'backpack'. You must use the push() method. Hint

Editor

1

2

3

4

5

6

let backpack = ['pencil', 'eraser', 'swatchbook'];

console.log(backpack);

// Expected outcome: ['pencil', 'eraser', 'swatchbook', 'compass']

Console

backpack:

[

pencil

,

eraser

,

swatchbook

]

Welcome to Owl Array, a game where you help the Owl Family with daily tasks.

To pass each level, you'll need to modify variables and arrays by using built-in JavaScript functions.