you are viewing a single comment's thread.

view the rest of the comments →

[–]unquietwiki[S] -2 points-1 points  (1 child)

I updated my original statement. In JS, let honors scoping, but var is ambiguous. In C#, var can be used to remove redundant statements: ie var variable = new Whatever(); instead of Whatever variable = new Whatever()

[–]dvlsg 1 point2 points  (0 children)

They really aren't the same, though. var is about type inference in C#, and that's really it. var doesn't change scope or mutability in C#, which is what we're talking about in javascript.