Data type part 3
Strings
JavaScript strings are used for storing and manipulating text.
A string can be any text that appears within quotes. You can use single or double quotes.var name = 'John';
var text = "My name is John Smith";
You can use quotes inside a string, as long as they don't match the quotes surrounding the string.var text = "My name is 'John' ";
You can get double quotes inside of double quotes using the escape character like this: \" or \' inside of single quotes
In order to create a string, we need to put the text inside...
Comments
Post a Comment