JavaScript has some good collection of Math functions to handle various requirements. These functions we can use inside our script based on the logic required. We can check a variable if it is a number or we can format a number or we can rounded off a number by using these Math function and can do much more than this. Here are some tutorials on handling math function.
Simple addition
We can add to numbers and display the result like this
var x=2+5
document.write(x); Output 7
Subtraction
var x =4-2
document.write(x); // Output 2
Multiplication
var x=4*9
document.write(x); Output 36
Division
var x=12/7;
document.write(x);//Output 1.7142857142857142
To get the reminder of this division we have to use modulus.