Stand in Line got stuck in it

Tell us what’s happening:

i dont know which number is to be added and remove
its too confusing in hints section too
anybody can make me clear what is arr.shift(iteam)

Your code so far


function nextInLine(arr, item) {
  // Your code here
  

  return a;  // 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:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/stand-in-line/

Look at the function parameters. You are given arr and item.

Your job is to modify incoming arr with adding and removing items using shift and push.

Calling arr.shift() will remove first item from your list.
Calling arr.push(item) will add item to your list in the back.