When should I use double or single quotes in JavaScript?

前端 未结 30 3443
攒了一身酷
攒了一身酷 2020-11-21 05:02

console.log("double"); vs. console.log(\'single\');

I see more and more JavaScript libraries out there using single quotes when ha

30条回答
  •  -上瘾入骨i
    2020-11-21 05:20

    After reading all the answers that say it may be be faster or may be have advantages, I would say double quotes are better or may be faster too because the Google Closure compiler converts single quotes to double quotes.

提交回复
热议问题