Mikesh Maharjan Posted on Jul 5, 2019 " vs ' in JavaScript. Which one do you prefer? #discuss #poll Top comments (3) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand Tobias SN Tobias SN Tobias SN Follow You lack the required permissions to view this bio. Joined Aug 13, 2018 • Jul 5 '19 Dropdown menu Copy link Hide ” so I can use apostrophes without having to escape them. And it just looks better in my opinion. Collapse Expand Peyton McGinnis Peyton McGinnis Peyton McGinnis Follow A pseudonormal programmer. Email hello@sergix.dev Location the earth Education working on a cs degree Joined Jun 20, 2019 • Jul 5 '19 Dropdown menu Copy link Hide Single quote. Faster to type since you don't have to hold down the shift key and ends up looking cleaner in my opinion. Collapse Expand Alvaro Montoro Alvaro Montoro Alvaro Montoro Follow CSS aficionado ⊆ Web Developer ⊆ Software Developer ⊆ Person (He/Him) Location Austin, TX Work UI Manager / CSS Aficionado Joined Apr 27, 2019 • Jul 5 '19 • Edited on Jul 5 • Edited Dropdown menu Copy link Hide I guess I'm old school: " for strings and ' for single chars. ...although it doesn't really matter because in the end, we have prettier and it unifies all of them into single quotes. Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
”
so I can use apostrophes without having to escape them. And it just looks better in my opinion.Single quote. Faster to type since you don't have to hold down the shift key and ends up looking cleaner in my opinion.
I guess I'm old school: " for strings and ' for single chars.
...although it doesn't really matter because in the end, we have prettier and it unifies all of them into single quotes.