Demonstration of write/writeln functions and for/in loop

Example output

The JavaScript code

Note: The bordersOn class is set to turn on borders for td elements.