What's the difference between single quotes and double quotes in strings? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What's the difference between single quotes and double quotes in strings?

11th Nov 2017, 6:07 AM
Pooja Lakshmi
Pooja Lakshmi - avatar
2 Answers
+ 9
No difference, you can use them both. Whichever you start the string declaration with, you can use the other one as a regular character inside the string with no need of escaping it. https://www.sololearn.com/discuss/50552/?ref=app https://www.sololearn.com/discuss/136/?ref=app
11th Nov 2017, 6:13 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 2
it's all the same thing,just tgat sometimes single strings could act as a character I.e in some languages
11th Nov 2017, 6:26 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar