Integer math calculation : Number « Data Type « JavaScript DHTML






Integer math calculation

   

<HTML>
<BODY>
<SCRIPT language="JavaScript">
var intValue=200;
document.write(intValue+"<BR>");

intValue += 200;
document.write(intValue+"<BR>");

intValue = intValue-50;
document.write(intValue+"<BR>");

intValue = intValue*0;
document.write(intValue+"<BR>");

intValue = intValue + 500;
document.write(intValue+"<BR>");

intValue -= 80;
document.write(intValue+"<BR>");
</SCRIPT>
</BODY>
</HTML>

   
    
    
  








Related examples in the same category

1.Convert a number to a precision
2.Fix a number
3.Convert a Number to a Exponential format
4.Convert a number to string by append empty string to it
5.Compare the value for integer numbers
6.Calculate the average for integers
7.Convert from Celsius to Fahrenheit
8.Convert Fahrenheit to Celsius
9.Calculate circle area/Peri/Calculate sphere volume
10.Declare float point number, boolean value and null value
11.Hexadecimal Numbers
12.Check if it is a number and calculate the cubic power
13.Read a number and compare its value
14.Add different type variables together
15.Using Binary Flags