Tell us what’s happening:
Describe your issue in detail here.
My issue is that I don’t understand what I’m supposed to do to this code to make it fit all the parameters that it’s supposed to have. The video and hint section didn’t help either.
**Your code so far**
function nextInLine(arr, item) {
// Only change code below this line
return item;
// Only change code above this line
}
// 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/102.0.5005.99 Safari/537.36
You don’t have to “lay out” the array. Your function receives an array. The array has already been created by the time the function is called.
You need to look the array methods you have seen it n the curriculum so far and pick the one that adds an element to the end of an array and pick the one that removes the first element of the array.