4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

シングルクオートとダブルクオートの違い

Last updated at Posted at 2018-03-25

シングルクオートとダブルクオートの違い とは?

ずばり、ない。

使いわけとしては、

それらはシングルクオーテーションでくくってやろう。」```
こんな感じ。

```js
var hoge = '{"name":"ken","id":12345}';

扱う文字列(ここでは {"name":"ken","id":12345} )に
ダブルクオーテーションが含まれるため、もしくはダブルクオーテーションを使いたいとき、
シングルクオーテーションを使う。

逆もしかり。

4
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?