var name = “John” // String of text “John”
var name = ‘John’ // String of text “John”
Both of the above variables are completely identical. Now, at this stage you might be wondering why we are able to use either. I mean, why not just standardize it to single or double quotes and leave it at that? Well, let me answer that question with another question: how do you think you might include a quotation inside your string? Imagine you are creating a variable that includes a quote – how would you do that?
Try this: