You’re missing the point of functions. A function is used to package up a small bit of reusable functionality: it takes some input and uses that input to generate some output. So look at the example. This is how the function is defined:
function ourFunctionWithArgs(a, b) {
console.log(a - b);
}
It uses a and b
Then you use the function by putting values in:
ourFunctionWithArgs(10, 5)
a is 10 and b is 5. But it could just as well be 100000 and 2. Or 4.35 and 0.927. Or -27 and 67.
You don’t define the function like this:
function ourFunctionWithArgs(10, 5) {
console.log(10 - 5);
}
There’s no point. Even if it worked, you could just write console.log(5) instead and it would be exactly the same, there would be no point in writing the function.