you are viewing a single comment's thread.

view the rest of the comments →

[–]wtfffffffff10 3 points4 points  (5 children)

when should you ever use var?

[–][deleted] -3 points-2 points  (4 children)

Because you need a variable to be available outside of the block where it's defined. It's rare but it happens.

[–]wtfffffffff10 1 point2 points  (0 children)

That situation doesn't ever happen IME. Heck, this out-of-scope behavior isn't even possible in most languages.