2. Getting clever

Stick this inĀ Thimble:

<!DOCTYPE html>
<html>

 <body>

 <canvas id="canvas" width="500" height="100" style="border:1px solid #000000;"></canvas>

 <script>
 var canvas = document.getElementById("canvas");
 canvas.style.width = '100%';
 canvas.width = canvas.offsetWidth;
 var context = canvas.getContext("2d");
 
 context.font = "33px Arial";

 for(var i=1; i<10; i=i+1){
 context.fillText(i, i*66, 33);

 if(i%2 == 0) {
 context.fillText("E", i*66, 66);
 }
 else{
 context.fillText("O", i*66, 66);
 }
 }
 </script>

 </body>

</html>

and you should get this:

[xyz-ihs snippet=”for-loop”]

Now change it and make it do even more clever stuff.