News for hackers. Stuff that matters.
Re:Say What You Mean (in JavaScript) by mshafrir on Tuesday May 18, 2010 @04:26PM (#1358920)
I prefer to always use {} for readability and consistency's sake, regardless of line count. Also reduces human error.
Re:Say What You Mean (in JavaScript) by chime on Tuesday May 18, 2010 @04:44PM (#1358990)
Me too. But if the goal was to shorten "if(foo()) { bar(); }, then I could just leave the {} braces out instead of making it "foo() && bar()".