Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
function nextInLine(arr, item) {
// Only change code below this line
arr.push(item);
const removed = arr.shift();
return arr.shift();
// Only change code above this line
nextInLine ([], 5);
nextInLine ([], 1);
nextInLine ([2], 1];
}
// Setup
const testArr = [1, 2, 3, 4, 5];
// Display code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 6));
console.log("After: " + JSON.stringify(testArr));
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.160 YaBrowser/22.5.1.985 Yowser/2.5 Safari/537.36
Thanks for the hint in the first part. Should I then specify the item I want to manipulate? Will try to implement that asap. Now, for the second part of the answer, it seems that it is given by default and cannot be changed, so no idea why those commands are there in the first place.