Square of a number graphical representation (Js)

Hi, I made program for drawing the square of a number just as shown in the lesson

https://jsfiddle.net/3uxhqfpw/

You are doing an amazing job!