DEV Community

Discussion on: Array Methods That .pop()

Collapse
 
akashkava profile image
Akash Kava

This is not correct, myShoppingList['juice'] returns a value of 2.

jsfiddle.net/5nzjobh6/

It returns undefined. Basically when you create an array, it ignores value of left hand side.

Collapse
 
britnorcodes profile image
Em 💫

You're right! Thank you, Sorry I had gotten myself confused too! Have updated the blog 😄

Some comments have been hidden by the post's author - find out more