Saved X
Google login
SignUp with Email
X

Forloop in js

theindreshverma ( Added  Sep 30, 11:16 am )
Login

Javascript for loop

<!DOCTYPE html>
<html>
<head>
    <title>for loop in js</title>
</head>
<body>

<h2>for loop in js</h2>

<p id="s"></p>

<script>
x = "";

for (i = 1; i <= 10; i++) {
    x += "Number " + i + "<br>";
}

document.getElementById("s").innerHTML = x;
</script>

</body>
</html>

Sourcecode Tags

More Sourcecodes

More Sourcecodes