Https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift

Tell us what’s happening:
Describe your issue in detail here.

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36

Challenge: Manipulate Arrays With shift()

Link to the challenge:

Take a look at the documentation for this function Array.prototype.shift() - JavaScript | MDN if you need arguemnts (the things you put in the parentheses) they would be defined under syntax. Check if you are not using something that shouldn’t be there :slight_smile:


That said, the stuff you have written should actually work just fine. It will ignore the excess argument. What is wrong there is the name of the variables, pay attention to naming, computer can only check the values we point it to.
If I tell it to check myCar it will not check yourCar for example :slight_smile:

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