Closed EmilyMB closed 9 years ago
Grumble: For multi-line strings, I'm not sure why they prefer string concatenation ("+") to splitting with "\". Happy about: most of it, especially descriptive naming.
Not sure my JS is strong enough to have any real opinion on any of these but... yeah.
I actually really appreciate this guide! I love that they show bad examples and good examples for each topic! I also like that they point out what not to make things. I never know and then get weird things happening because I ised a key word. I'm not sure if I get the difference when to use the dot notation yet vs subscript. Hopefully that will click.
Hoisting confuses me.
this. I'm also still getting familiar with. I was thinking it was just like self in Ruby but now I'm not so sure.
Bookmarking this!
I am still confused about hoisting... I think I may prefer the explanation in chapter 15 about hoisting better this one.
I like the examples! I think I will definitely be referring back to this.
I like the comment prefix's. I think that is good for clarity.
Call me crazy but I see zero difference between the 3 examples on "End files with a single newline character." // bad (function(global) { // ...stuff... })(this);
// good (function(global) { // ...stuff... })(this);↵
This stylesheet seems to help you avoid some common pitfalls, unlike the thoughtbot guide for ruby, which just made clear some style choices. One place I really noticed this was in the Constructors section, when assigning methods to the prototype object. Definitely a good reference, especially seeing how many other companies use it!
I like the examples. I think for someone who may be new to a language can benefit a lot, I know I did. Some of these were a little more confusing, and took more glancing over. I did find a few spots where they suggested //bad, then a few examples later they would make a case for why it is ok. Think my JavaScript skills need some more work. Will be referencing more!
I don't think that I am familiar with Javascript enough to really have an informed opinion, but I'll certainly follow the style guide, much smarter people than I came up with it, so I'm sure they had good reasons for their choices.
Discuss Airbnb's JavaScript style guide here. In particular, when you glanced over the style guide, which aspects made you jump out of your chair and say "YES!" and which ones made you grumble in quiet, reserved discontent?