Demonstration of write/writeln functions and for loop
The JavaScript code:
for (var i=1; i<=10; i++) { document.writeln('<h3>' + i + '</h3>'); }