Stand in Line bug?

I’m stuck on the Stand in Line challenge. I believe I have the right code and 3 out of the 4 tests are confirmed but the 3rd one (nextInLine([5,6,7,8,9],1) should return 5) doesn’t validate for some reason even though the console shows the code is returning the correct value. Can someone tell me if my code is incorrect, or if there’s a bug in the challenge? Thanks.

function nextInLine(arr, item) {
  // Your code here
  testArr.push(item);
  return testArr.shift();
}

// Test Setup
var testArr = [5,6,7,8,9];

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

You have a bug in your code. Look closely at what array you’re .pushing and .shifting with :wink:

Ah! should just be arr. Thank you! On to the next challenge! :slight_smile: