Stand in Line TypeError: arr.shift is not a function

Stand in Line TypeError: arr.shift is not a function
0.0 0

#1

Tell us what’s happening:
the output box is showing this message>>
TypeError: arr.shift is not a function

Your code so far

function nextInLine(arr, item) {
  // Your code here
  arr.push(item);
  var output = arr.shitf();
  return output;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4,5];



// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 10)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));

Your browser information:

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

Link to the challenge:


#2

I think you just misspelled shift


#3

oh my bad :joy::joy::joy::joy: