I am stocked at adding pop to array please, I need assistance

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

// Setup
const myArray = [["John", 23], ["cat", 2]];

// Only change code below this line
const removeFromMyArray = myArray.pop();
console.log(myArray);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Manipulate Arrays With pop()

Link to the challenge:

It looks all right, but you don’t need to use console.log for this step I guess

Thank you, but I just tried it, it did not work.

Let’s figure this out. How your code looks like right now? Can you paste it here?

Hi and welcome,

You write removeFromMyArray. In order to pass, the course wants you to write removedFromMyArray. It’s clearly instructed.

2 Likes

sure,

const myArray = [[“John”, 23],[“cat”, 2]];
const removeFromMyArray = myArray.pop();

Thanks you, just saw my error.

Thanks, didn’t see it right away

2 Likes

Attention to small things and re-read it carefully is important in order to find error in our code. It will help you in future.