Use of Global and Local Variables : Variable Definition : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Variable Definition »

 

Use of Global and Local Variables




<HTML>
<HEAD>
<TITLE>Global and Local Variables</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function displaySquared(y) {
    var x = y * y
    document.write(x+"<BR>")
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript"><!--
for(x=0;x<10;++x)
 displaySquared(x)
// -->
</SCRIPT>
</BODY>
</HTML>

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Variable Definition