Do simple calculation : Variables : Language Basics JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Language Basics » Variables »

 

Do simple calculation

















<HTML>
<BODY>

<SCRIPT language="JavaScript">
<!--
var myVar=2000;
document.write(myVar+"<BR>");

myVar+=2000;
document.write(myVar+"<BR>");

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

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

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

myVar-=80;
document.write(myVar+"<BR>");

//-->
</SCRIPT>

</BODY>

</HTML>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Language Basics
» Variables