O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

Why don’t the parameter names have var in front of them? A parameter is a new variable right?


A: Effectively yes. The function does all the work of instantiating the variable for you, so you don’t need to supply the var keyword in front of your parameter names.


Cover of Head First JavaScript Programming


Why is there not a variable type before the parameters in function declaration/definition unlike Java which is a very typed language?