Hi, just learning Javascript for the 1st time.
When the lessons mention using param1, param2, num… are these actual terms within that language, or are they just made up placeholders for whatever variables will be placed when calling the function?
Ex: (in the lesson Passing Values to Functions with Arguments)
function testFun (param1, param2) {
console.log(param1, param2);
}
Where param1, param2 stay the same and we supply numbers when we call the functions - are “param” the generally accepted placeholders?
I replaced them with the word ‘duck’ (duck1 and duck2) and the function still worked - would that actually work while doing actual developing? Probably a moot question since we’ll be doing stuff beyond this when actually working(?).
I’m so sorry if I missed this in an earlier lesson. I did find this:
“any names can be used because they are local to the function in which they are declared” (see citation below).
This tells me that param and num are “made up,” and also tells me to just be consistent in whatever I use - unless there are industry standards? I also just want to verify that I’m understanding this correctly.
citation: [Parameters and Arguments (auckland.ac.nz)]
(Parameters and Arguments