MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/30hyan/airbnb_javascript_style_guide_a_mostly_reasonable/cpsze05/?context=3
r/javascript • u/mrkipling • Mar 27 '15
158 comments sorted by
View all comments
10
Mostly good stuff.
I prefer String(foo) instead of '' + foo.
I think 4 spaces are better than 2.
'collection.length > 0' is perfectly reasonable, there's no need to use shortcuts whenever possible.
I've always used "that" over "_this", but these days this is rarely needed thanks to the fat arrow syntax.
14 u/Ryckes Mar 27 '15 I think 2 spaces make it difficult to guess which block a given statement belongs to. 4 spaces is perfect for me.
14
I think 2 spaces make it difficult to guess which block a given statement belongs to. 4 spaces is perfect for me.
10
u/nawitus Mar 27 '15
Mostly good stuff.
I prefer String(foo) instead of '' + foo.
I think 4 spaces are better than 2.
'collection.length > 0' is perfectly reasonable, there's no need to use shortcuts whenever possible.
I've always used "that" over "_this", but these days this is rarely needed thanks to the fat arrow syntax.