First of all my compliments for the construction of the videos and website!
I have a question about innerWidth.
At the top of the code, use
canvas.width = window.innerWidth;
but for example to empty the canvas you only use innerWidth without window.
ctx.clearRect (0,0, innerWidth, innerHeight);
Did I miss a declaration at the top of the innerWidth code? For me it also works without declaration from innerWidth.
So my question is why you sometimes use window.innerWidth and sometimes only innerWidth?
Thank you in advance for your answer!