Q) I want to know about difference between ' and "


is there any difference...?


In technical terms.. No.

However, if you wanted to use (") in your sentence then you would surround the string with (') instead. and vice versa. It allows you to utilize those characters without ending your sentence prematurely. Otherwise I haven't found any other difference.


like ' "content" ' and " 'content' " ?



Either way it'll send the string, but this way you can incorporate them into your string. It gets tricky if you would like to have both in the string at once, but you can just swap the ' " ', and " ' " with a + sign between them. like the following

prompt(' "This is what the fox said" ' + "It's not what he actually said");


How kind of you! thank you!


In case you want both of them in a sentence you could escape them by \ e.g.

console.log("The word \"Test\" is written in \'\' oh wait no it's \"\" ");


That's probably the easiest way, but I was showing him how he could use the difference between a ' and a ". If there's any other reason to use one or the other I haven't run into it.


Me neither (at least not for javaScript) and what you said was fine just wanted to mention this way as well.