I need help with the (Stand in Line challenge)

I need help with the (Stand in Line challenge)
0

#1

Tell us what’s happening:
Hi guys,can someone explain this to me. I really don’t get it

Your code so far

function nextInLine(arr,ray) {
  
  // Your code here
  arr.push(item);
  var removed = arr.shift();
  return removed;  // Change this line 

}



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


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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0.

Link to the challenge:


#2

in your firt line, you mistakenly modified

function nextInLine(arr,item) {

into

function nextInLine(arr,ray) {

just turn it back and everything solved


#3

I solved it ,thanks very much :kissing_heart: