Tell us what’s happening:
Describe your issue in detail here.
Can you please tell me how does the ‘arr’, and ‘item’ arrguments know that ‘arr’ arrgument from the function is acctualy the array , in this case 'testArr=[1,2,3,4,5]; and how does the javascript know that ‘item’ that has been ‘pushed’ is to be 6;
**Your code so far**
function nextInLine(arr, item) {
// Only change code below this line
arr.push(item)
return arr.shift();
// Only change code above this line
}
// Setup
var 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/91.0.4472.124 Safari/537.36 Edg/91.0.864.64
Challenge: Stand in Line
Link to the challenge: