Here’s the assessment, my code and a live example.
Any advice is always welcome.
Here’s the assessment, my code and a live example.
Any advice is always welcome.
Great work on this exercises!
Here are some comments:
+ 0
?rect()
and fill()
to ctx.fillRect(x, y, width, height);
random()
function only works when min
is 0. For example, when you choose min=3 and max=8 than you will get a number between 3 and 10. The correct formula would be: Math.floor(Math.random() * (max - min)) + min
Keep up the good work!
Happy coding,
Michael
My response to your comments:
Task 1: It was a mistake, I was working on the third task first so that’s why there’s a + 0
on there. It was supposed to be a + min
.
Task 2: Thanks, I’d never worked with canvas
before so this was the toughest task for me.
Task 3: I’ll be updating my formula as soon as possible.
Thank your for your comments @mikoMK, I’ll be updating my code as soon as possible.
Now everything is perfect
Great work!