Data type part 3

Strings



JavaScript strings are used for storing and manipulating text.
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...

<string> </string> tag
Quotation marks
/ symbols

Comments

Popular posts from this blog

Comparison Operators part 2

Break and Continue part 1

Module 2