Hi, guys when it comes to making the second rectangle on top of the square, I dont know where to begin. I have researched online and I see alot of similarities with the code the exercises come with. However, two make two of them gets me confused. I will continue to research until I get a response!
Hi @melgozag20 and welcome to the community
The methods you’re going to need are:
- ctx.clearRect() to clear the canvas
- ctx.fillStyle to select the color of the rectangle
- ctx.fillRect() to draw the rectangle
When you get further in the exercise, you can update and save your CodePen and I can have a look at your work.
See you,
Michael