Source Code:
(back to article)
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <div id="divId"></div> <script> let i = 0; function count() { // do some hard work do { i++; divId.innerHTML = i; } while (i % 1e3 != 0); if(i < 1e7) { setTimeout(count); } } count(); </script> </body> </html>
Result:
Report an issue