r/javascript • • Apr 01 '18

Google publishes a JavaScript style guide. Here are some key lessons.

https://medium.freecodecamp.org/google-publishes-a-javascript-style-guide-here-are-some-key-lessons-1810b8ad050b
714 Upvotes

317 comments sorted by

View all comments

Show parent comments

0

u/Wooshception Apr 01 '18

Single quote is arguably faster to type since it’s a key that doesn’t require modification. The difference in speed may be tiny but adds up quickly for something typed potentially hundreds of times a day.

Embedded quotes are relatively rare and from my experience occur only slightly more frequently than embedded double quotes.

0

u/darkbreakersm Apr 01 '18

On most international keyboards you have to press spacebar after typing a quote for it to be inserted, so both are really a PITA in the end

-3

u/[deleted] Apr 01 '18

Premature optimization is the root of all evil. Prettier + eslint makes this rule irrelevant.