Wednesday, June 5, 2013

Always put the open curly brace on the same line as the thing opening it in JavaScript.

This suggests not doing so comes with pain here and there. An example:

return
{
   id: $item.data('id'),
   text: $item.text()
}

No comments:

Post a Comment