Where did this array get in the function?

Everything is understood, except, what causes this var testArr to be involved with the function nextInLine? After looking at these four lines of code for about 30 minutes I’ve finally come to the conclusion that I have lost my mind. Please, please somebody help me understand this.

  **Your code so far**

function nextInLine(arr, item) {
// Only change code below this line
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 (X11; CrOS x86_64 13597.94.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.186 Safari/537.36.

Challenge: Stand in Line

Link to the challenge:

This line. The function nextInLine is called passing testArr and 6 as arguments to the function. That is how testArr is involved. Inside the function, arr is testArr.
arr references the same array as represented by testArr.