Javascript for loop


Code Example:
<script>
       for (var a =2; a <=20; a=a+2){
            document.write(a + "<br>");
        }
</script> 

Result:
2
4
6
8
10
12
14
16
18
20

No comments:

Note: Only a member of this blog may post a comment.

Copyright Reserved to Anything Learn. Powered by Blogger.