Explore 100's Of Free Video Tutorials

Keep Learning, Keep Coding & Keep Sharing

JavaScript Arithmetic Operators

Notes:

JavaScript Arithmetic Operators:

+: Addition Operator : sum of two numbers
- : Subtraction Operator : difference between two numbers
*: Multiplication Operator : product of two numbers
/: Division Operator : quotient of division operation
%: Modulus Operator : remainder of division operation

document.write("Arithmetic operators");
document.write(2+3); // 5
document.write(5-3); // 2
document.write(5*2); //10
document.write(10/2); // 5
document.write(10%2); // 0
document.write(10/0); //Infinity
document.write(parseInt("2")+parseInt("3")); // 5
document.write(127895%10); //5
document.write(parseInt(127895/10)); //12789

Interview Questions: