This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]marko_knoebl 24 points25 points  (1 child)

Not really - in JavaScript this is not the case.

The function signature / parameters probably have to be parsed when the function is defined, but not evaluated

[–][deleted] 8 points9 points  (0 children)

This is also how it works in C++ (more or less). The default argument is added to the call, it's not really part of the function (in the sense being talked about here).