var myVariable = "This is a string";
String literals are surrounded by double quotes. They can be formed from multiple strings concatenated together using the "+" operator:
var multiString = "The Father + Son + Holy Ghost";
You can also include numbers inside strings:
var numberString = '2 + 3 = 5';
var x = 2; var y = 3; var z = x + y; // What is the value of z?
The answer depends on whether x and y are treated as integers or floating point numbers when doing the addition. If they're treated as integers, the result of the addition is 5 (2+3=5). If they're treated as floating point numbers, the result is 6 (3.0+3.0=6.0). To avoid these ambiguities, always use explicit casts like this:
var x = 2; var y = 3; var z = (x + y) / 2; // z is now 1 or 6 depending on whether x and y are integers or floats