Nalini1998 / Project_Public

MIT License
2 stars 0 forks source link

What will be logged to the console when we run the code below? #534

Closed Nalini1998 closed 1 year ago

Nalini1998 commented 1 year ago
const myArray = ['item 0', 'item 1', 'item 2'];

myArray.push('item 3');
myArray.pop();

console.log(myArray);

A. ['item 0', 'item 1', 'item 2', 'item 3']

B. ['item 0', 'item 1', 'item 2']

C. ['item 1', 'item 2', 'item 3']

Nalini1998 commented 1 year ago

I chose B