You also left out 'this', and 'arguments' which are important for understanding functions and parameters in Javascript.
What's also missing is talking about why it is significant that the function executes as though parameters were variables assigned with argument values.
Which is kind of disappointing in an article titled "You don't know the first thing about functions in JavaScript". :)
Top comments (4)
Except that it probably doesn't actually do that.
The key phrase here is, "as though".
You also left out 'this', and 'arguments' which are important for understanding functions and parameters in Javascript.
What's also missing is talking about why it is significant that the function executes as though parameters were variables assigned with argument values.
Which is kind of disappointing in an article titled "You don't know the first thing about functions in JavaScript". :)
You know you could pass them directly in the parameters and reduce the number of lines and possibly prevent declaring this values twice
I did not know that, nice one
Fun little game, thanks for sharing!