MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/30hyan/airbnb_javascript_style_guide_a_mostly_reasonable/cpspgh5/?context=9999
r/javascript • u/mrkipling • Mar 27 '15
158 comments sorted by
View all comments
3
Mostly?
38 u/mrkipling Mar 27 '15 Yes - they suggest a tab indent of 2 spaces instead of the obviously-correct value of 4. Hence, mostly reasonable :) 2 u/DaemonXI Mar 27 '15 Normally I like four spaces, but JavaScript is so heavily nested with callbacks that I think using two spaces actually makes the code more readable. 0 u/[deleted] Mar 27 '15 [deleted] 2 u/wdpttt Mar 27 '15 Are you serious? Why that? 0 u/[deleted] Mar 27 '15 [deleted] 4 u/eridal Mar 27 '15 well he's trying to say that it does not make much sense as (1) functions are values, (2) variables can reference functions, and (3) variables and functions declarations share the same namespace
38
Yes - they suggest a tab indent of 2 spaces instead of the obviously-correct value of 4. Hence, mostly reasonable :)
2 u/DaemonXI Mar 27 '15 Normally I like four spaces, but JavaScript is so heavily nested with callbacks that I think using two spaces actually makes the code more readable. 0 u/[deleted] Mar 27 '15 [deleted] 2 u/wdpttt Mar 27 '15 Are you serious? Why that? 0 u/[deleted] Mar 27 '15 [deleted] 4 u/eridal Mar 27 '15 well he's trying to say that it does not make much sense as (1) functions are values, (2) variables can reference functions, and (3) variables and functions declarations share the same namespace
2
Normally I like four spaces, but JavaScript is so heavily nested with callbacks that I think using two spaces actually makes the code more readable.
0 u/[deleted] Mar 27 '15 [deleted] 2 u/wdpttt Mar 27 '15 Are you serious? Why that? 0 u/[deleted] Mar 27 '15 [deleted] 4 u/eridal Mar 27 '15 well he's trying to say that it does not make much sense as (1) functions are values, (2) variables can reference functions, and (3) variables and functions declarations share the same namespace
0
[deleted]
2 u/wdpttt Mar 27 '15 Are you serious? Why that? 0 u/[deleted] Mar 27 '15 [deleted] 4 u/eridal Mar 27 '15 well he's trying to say that it does not make much sense as (1) functions are values, (2) variables can reference functions, and (3) variables and functions declarations share the same namespace
Are you serious? Why that?
0 u/[deleted] Mar 27 '15 [deleted] 4 u/eridal Mar 27 '15 well he's trying to say that it does not make much sense as (1) functions are values, (2) variables can reference functions, and (3) variables and functions declarations share the same namespace
4 u/eridal Mar 27 '15 well he's trying to say that it does not make much sense as (1) functions are values, (2) variables can reference functions, and (3) variables and functions declarations share the same namespace
4
well he's trying to say that it does not make much sense as (1) functions are values, (2) variables can reference functions, and (3) variables and functions declarations share the same namespace
3
u/brotherwayne Mar 27 '15
Mostly?