For simple arithmetic (addition, subtraction, multiplication and division), use the respective symbols...
addition: +
subtraction: -
multiplication: *
division: /
example -- add 2 and 3: x = 2 + 3;
For more complex operations (square root, trigonometry, etc.), you usually use a Math.xxx function, where xxx is the name of the function...
example -- square root of 29: x = Math.sqrt(29);
This is a good site...
http://www.w3schools.com/jsref/
|