the function nextInLine(arr, item) is called.
Because the call to the function is nextInLine(testArr, 6) you have access to testArr.
If you use the statement arr.push(item); inside the function it will be interpreted as testArr.push(6);. Basicly arr becomes a reference to testArr until the function is done. In this way you can use the same function for multiple arrays without repeating code.
This is a function definition. The name of the function is nextInLine, and it takes two parameters - arr, and item. This code is not run until the function is called.
function nextInLine(arr, item) {
// ...
}
This is a function invocation. The code inside the function definition will run with the value of arr set to reference testArr, and the value of item as 6.