1) There is no function named "LocalFunction" declared but a function named "localCounter".
2) There is no variable "y" declared in the enclosing scope.
3) There is no method "M" declared which forms the enclosing scope but a function named "Counter".
The page shows also the anti-pattern of "constantly renamed variables" and doesn't stick with the
C# naming conventions. That are no errors but it's bad style. Since there is a good chance that programming novices might read this page, they might come to the conclusion that bad style isn't something to worry about.
Since there is more than one error in this page, I'm going through the errors by number.
Please take a look at the screenshot below.
1) There is no function named "LocalFunction" declared but a function named "localCounter". 2) There is no variable "y" declared in the enclosing scope. 3) There is no method "M" declared which forms the enclosing scope but a function named "Counter".
The page shows also the anti-pattern of "constantly renamed variables" and doesn't stick with the C# naming conventions. That are no errors but it's bad style. Since there is a good chance that programming novices might read this page, they might come to the conclusion that bad style isn't something to worry about.
Please don't give that impression.
Kind regards, Lord Saumagen.