Math operation part 1

Math Operators
34
1/5













Arithmetic Operators
Arithmetic operators perform arithmetic functions on numbers (literals or variables).
In the example below, the addition operator is used to determine the sum of two numbers.
You can add as many numbers or variables together as you want or need to.
You can get the result of a stringexpression using the eval() function, which takes a string expression argument like eval("10 * 20 + 8") and returns the result. If the argument is empty, it returns undefined.
What will display in the result of the following statements?
var test=5+7;
document.write(test);
var test=5+7;
document.write(test);
Comments
Post a Comment