<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>
Related Scripts with Example Source Code in same category :