here is my canvas code:
I'd say that is one of the most efficient ways of canvas drawing, especially with the functional abstractions. If you ever need to later dynamically change the positions of the shapes, I would recommend integrating classes.
CodingTrain on YouTube has some very good videos on this concept.
Thank you SuperC for the good explanation, I have been currently watching the CodingTrain P5, and I will definitely check out his videos on integrating classes...thank you for the recommendation and explanation.