3 ms·
>If you prefix them with var they're function scoped, but there's no way to make them local to the curly braces of an "if" statement. There is; it's just ugly.
by mistercow 13y ago
>If you prefix them with var they're function scoped, but there's no way to make them local to the curly braces of an "if" statement.
There is; it's just ugly. You just have to use an immediate function as the body of the if statement.
- djKianoosh 13y agoin the words of will smith in men in black, "please keep that kinda shi* to yourself"
- mistercow 13y agoI don't understand what you're trying to say, but I was describing a common and useful pattern.
- deleted 13y ago[deleted]
- djKianoosh 13y agoi was complimenting you.. ahh nevermind