Untitled
unknown
plain_text
3 years ago
384 B
7
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...