Joined March 2014
·

Adrián Salgado

Santiago
·
·

Posted to Stop It With the Vars over 1 year ago

I agree about declaring variables at the beginning of the function, but not about "saving up some bytes and making the code look uglier", that's just premature optimization and unnecessary if you're minimizing your code later (Concat+UglifyJS+gzip). I'll only recommend this if you're working on a project of your own, but for other developers it might be harder to read.

Also, Crockford.

Achievements
1 Karma
0 Total ProTip Views
Interests & Skills