this post for admin:
change description
from: removedFromMyArray
should only contain ["cat", 2]
to: removedFromMyArray
should only contain ["John", 23]
.
U have mistake there
this post for admin:
change description
from: removedFromMyArray
should only contain ["cat", 2]
to: removedFromMyArray
should only contain ["John", 23]
.
U have mistake there
The test is correct, removedFromMyArray contains the value that was popped from myArray.
var myArray = [["John", 23], ["cat", 2]];
var removedFromMyArray = myArray.pop();
myArray // ["John", 23]
removedFromMyArray // ["cat", 2]
The pop method removes the last element from an array and returns that value to the caller.