the test needs my nextInLine([5,6,7,8,9], 1) to return 5 and after nextInLine(testArr, 10), testArr[4] should be 10.
**Your code so far**
function nextInLine(arr, item) {
// Only change code below this line
arr = arr.push(item)
console.log(arr)
let firstElemRemoved = [arr].shift()
console.log(firstElemRemoved)
return firstElemRemoved
// arr.push(item);
// console.log(arr) // const removed = arr.shift();
//console.log(removed) // return removed;
// Only change code above this line
}
// Setup
const testArr = [5, 6, 7, 8, 9];
// Display code
console.log(nextInLine([5,6,7,8,9], 1));
console.log(nextInLine(testArr, 10), testArr[4]);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Stand in Line
Link to the challenge: