Operators are used to change or gather information about variables. This page will deal only with basic arithmetical operators. Other types of operator (eg logical - and, not etc.) will appear in the guide when used in the context of a specific script.
Arithmetic with Variables
The following lines of code will add the variables a and b together and post the result in a message box.
var a = 5
var b = 10
var answer = a + b
alert("The answer is " + answer)