Hacker News new | ask | show | jobs
by bpicolo 3154 days ago
Why is the `var` keyword required in function arguments if it's dynamically typed and there's no other possible option?
2 comments

So you don't create variables when you typo a variable name. Declarations are an error catching mechanism
This is a complete guess, but maybe so they can treat it the same way as normal variable declarations
Might be. Probably reusing the same pattern matching code in function definitions.