Basic JavaScript - Manipulate Arrays With shift() - TOoklZX1qgJevFebG2sWX

Tell us what’s happening:
Failed: removedFromMyArray should contain [“John”, 23].
I put the console.log(removedFromArray) to check my answer ando looks correct so far i don’t know why is failing.

Your code so far

// Setup
const myArray = [["John", 23], ["dog", 3]];
// Only change code below this line
const removedFromyArray = myArray.shift();
console.log(myArray)
console.log(removedFromyArray) 

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Challenge: Basic JavaScript - Manipulate Arrays With shift()

Link to the challenge:

Welcome to the forum.
Typo in variable name

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.