When should I use double or single quotes in JavaScript?

前端 未结 30 3383
攒了一身酷
攒了一身酷 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条回答
  •  半阙折子戏
    2020-11-21 05:16

    Let's look what a reference does.

    Inside jquery.js, every string is double-quoted.

    So, beginning now, I'll use double-quoted strings. (I was using single!)

提交回复
热议问题