JS Parameters Inside the Function: Golf Code

Can anyone explain the two parameters passed inside of function?

Why this (par, strokes) ? Why not this (strokes, par) ?
E.g. Arrays here
function myFunction(par, strokes){
if(strokes == 1){
return names[1];
}
}
var results = myFunction(5, 7);
document.write(results); // no errors

But when I changed the parameters like this:

function myFunction (strokes, par){
    if(strokes == 1){
             return names[1];
        }
}
var results = myFunction(5, 7);
document.write(results); // errors or it displays unexpected results

those are both valid function expression. You could even do (apples, bananas)
but as it is the tests that call the function to test if it works, the arguments are passed in the function in a certain order.
So, the function parameters could be named whatever, but it is useful to have descriptive names to them

anyway, if you have a function definition like this:

function myFunc(name, age) {
    return "My name is " + name + " and I am " + age + " years old"
}

and the function is called myFunc("Mary", 42), this returns My name is Mary and I am 42 years old

you can’t change the function call, as that is defined elsewhere.
You can change the function definition.
So you could decide to write…

function myFunc(age, name) {
    return "My name is " + name + " and I am " + age + " years old"
}

if we call here myFunc("Mary", 42), this returns My name is 42 and I am Mary years old
why?
because we have changed the function parameter names without changing the function body.
It happens something similar in your case. Even if you get errors because the logic is not that simple.