Javascript consle prints Array 2?

var myArray = [["John", 23],["cat", 2]];

console.log(myArray)

var removedFromMyArray = myArray.pop();

console.log(removedFromMyArray)

console.log(myArray)

When I wrote the above script, it printed out on the console.log(myArray) = (Array 2)???

The removedfrommyarray printed out coorectly and cat and 2 where both shown but why wasnt John 23 printed out instead of Array 2`?

Thanks it just displaye (Array 2) and then if you check you find everything is in order. I just dont know why it didnt directly print out John and 23?

console.log(myArray)
Just printed array 2 but then there was an arrow and when I pressed it I found all my variables. Sorry for being confusing I am a TRUE BEGINER.

image

Seeing something like this? In the image above, DevTools simply representing Array that way (2) means two elements and the arrow is a convienient way to peek into the array and see what is going on inside. This way to represent arrays can be helpful, especially when array has a lot of elements, it may clutter your entire screen :slight_smile: Not sure if helps.

That is what I was asking exactly.

So that eans there was nothing wrong with my code and that is what is important.
Thank you all!