For Advertisements on this blog Contact Us at developgram@gmail.com or +91-9923438816

Simple Programming Tutorials For Beginners

Tuesday, April 18, 2017

Friends Array

<html>
<body>
  <script>
    var i;
    var friends = new Array;
    friends[0] = "Armash";
    friends[1] = "Shuraim";
    friends[2] = "Yuzzy";
    friends[3] = "Zaki";
    friends[4] = "Hasnain";
    friends[5] = "Shahbaz";

    for(i=0; i<6; i++)
    {
      if(i%2 == 0)
        document.write(friends[i] + "<br>");
    }
  </script>
</body>
</html>


No comments:

Post a Comment

SEARCH THIS BLOG