String - Definition

A string is a variable that contains text

var email = "www.digitalworkshop.com"

Text in a variable must be surrounded by quote marks, you can use either single (‘hello’) or double ("goodbye") quote marks. Text surrounded by quote marks is treated as a string and not as a line of code, for example

var welcome = "Hello " + UserName + " Welcome to Creator"

In the example above, UserName is the name of another variable and not a string – if the value of that variable was John, then the variable welcome would contain the following value

Hello John Welcome to Creator

 

Note that the spaces have to be included in the strings.