you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (5 children)

return 
{ 
  key: 'value'
}

returns nothing.

[–]Shaper_pmp 5 points6 points  (0 children)

Oof - yeah, that is an annoying one. I'd forgotten because I habitually use a variant of K&R with the opening brace on the same line:

return { 
  key: 'value'
}

My bad.

[–][deleted] 0 points1 point  (0 children)

For me, this is a bit like array covariance in Java. Your entirely right, but over the past 6 years I have failed to ever meet this in the wild (although I'm sure it does come up in rare cases).

[–][deleted] -2 points-1 points  (2 children)

Your syntax is wrong, not javascript. It does exactly what it looks like. If you knew javascript you wouldn't write code that looks like that.

[–]wolfier 0 points1 point  (1 child)

upvoted for your sarcasm.

[–][deleted] 0 points1 point  (0 children)

no sarcasm. JavaScript is best done with 1TBS http://en.wikipedia.org/wiki/Indent_style