I cant understand whats happening here. why variable named testArr are connected with function nextInLine? there are no any links between them, so why this function affect this variable? explain pls

the function is called in line 9 with testArr
as argument
please donโt post screenshots, post the code