4 ms·
i could see nested callbacks favoring two spaces, but overall it's not a style unique to javascript. for example, a lot of ruby i've seen (admittedly it's been
by abiox 8y ago
i could see nested callbacks favoring two spaces, but overall it's not a style unique to javascript.
for example, a lot of ruby i've seen (admittedly it's been a while) used two spaces, and i don't recall it being any more prone to deeply nested code than other languages.
that said js code tends to be rendered in a variety of other places like browser dev tools, which may influence this as well.
- jessaustin 8y agoAfter getting used to 2 spaces in js I try to use them everywhere now. Except python, which obviously must be 4 spaces...