Why you don’t skip adding curly braces on if statements in 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.

One Response to “Why you don’t skip adding curly braces on if statements in Javascript”

  1. LOL @ lazy ppl, srsly.

Leave a Reply