Javascript quiz Tutorial

Hello, Everyone
I recently picked up javascript, and I am starting to build projects in javascript. While I was studying a particular tutorial on building javascript quiz from this website : https://simplestepscode.com/javascript-quiz-tutorial/
I noticed something strange, noticed that the object is myQuestion
But when you go through the for loop, it is written as:

for(var i=0; i<questions.length; i++)

shouldn’t it be:

for(var i=0; i<myQuestions.length; i++)

If the the object array is myQuestions, shouldnt it be placed inside the for loop.
I understand the entire program, but this is part that is confusing

questions is probably a function parameter and myQuestions a global object - does this make sense?

I understand, but myQuestions is an object array. I dont see how you can use a function parameter as a array

(questions[ ])

you pass the global object as function argument: generateQuiz(myQuestions, quizContainer, resultsContainer, submitButton); (step 4: put it all together)

so inside the function you just use questions, and in this way the function is completely reusable, you can have a different object, put that in the function call, and it works anyway

you use function parameters as arrays when they have an array passed in

" you pass the global object as function argument: generateQuiz(myQuestions, quizContainer, resultsContainer, submitButton); (step 4: put it all together)"

Okay now I understand, but why not pace “myQuestions” as a function parameter at the beginning of the code.

myQuestions is a global variable, it is being written outside the function

questions instead is the function parameter - function generateQuiz(questions, quizContainer, resultsContainer, submitButton){...}

in this way you have a function that can be used with different objects that contain questions

if you are asking why those specific names, that’s author choice