Tech Fact 555
Thursday, April 23, 2020
Program to print numbers from 0 to 50 in JavaScript
var printFiftyNumbers() {
var text = "";
var i;
for(i=0; i <= 50; i++) {
text += i + "<br>";
}
document.getElementById("demo").innerHTML = text;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment