Untitled

 avatar
unknown
plain_text
2 years ago
384 B
6
Indexable

           LOOP





<!DOCTYPE html>
<html>
<head>
    

<title>Loop In JavaScript</title>
</head>
<body>
    <p id="a"><p>
        
    <script>
  let text="";
  for(let i=0;i<=15;i++)
      {
      if(i%2==0)
      text +="is Even " + i +"<br>"
      else 
      text += "is Odd" + i +"<br>"
      }
      document.getElementById("a").innerHTML=text;
    
</script>
</body>
</html>
Editor is loading...