Manipulate Arrays With pop() Example

Manipulate Arrays With pop() Example
0

#1

Tell us what’s happening:
You need to have something like this…

// Example
var ourArray = [1,2,3];
var removedFromOurArray = ourArray.pop(); 
// removedFromOurArray now equals 3, and ourArray now equals [1,2]

// the elements of myArray is here
var myArray = [["John", 23], ["cat", 2]];

// removed from my array array is equal to a popped off myArray
var removedFromMyArray = myArray.pop();

Your code so far

// Example
var ourArray = [1,2,3];
var removedFromOurArray = ourArray.pop(); 
// removedFromOurArray now equals 3, and ourArray now equals [1,2]

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

// Only change code below this line.
var removedFromMyArray = myArray.pop();

Link to the challenge:

Summary

This text will be hidden


#2

What seems to be the problem?