Why you don’t skip adding curly braces on if statements in Javascript
Posted by Ian Serlin | Tweet This | Filed under Javascript
Don’t skimp on the curly braces wrapping if statements or other one-liner code blocks in Javascript because minifying/packing that Javascript can lead to avoidable and hard to track down errors, especially in IE which surprisingly cares a lot.
I’m super tired of seeing this bad practice and having it waste my time. You’re just lazy and that’s the worst kind of optimization.
February 1, 2010 at 3:07 pm
LOL @ lazy ppl, srsly.