programming-examples/js/Others/A While Loop That Decrements from 10 to 1.js

17 lines
272 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
<html>
<head>
<title>Happy Codings :-) JavaScript Code Examples</title>
</head>
<body>
<H1>
<SCRIPT>
var counter = 10;
while (counter > 0)
{
document.write (counter + "<br>");
counter--;
}
</SCRIPT>
</H1>
</body>
</html>