+ 1
Can anyone help me whats problem in this
Error in code repo https://code.sololearn.com/W7Vnbg5n0Q0A/?ref=app
5 Answers
+ 3
Shubham
align is an attribute which should be inside tag
<h1 align="center">
remove extra canvas tag
+ 3
Shubham
y is going below 0 means in minus
This code should be inside draw function:
t = Date.now();
speed = 25;
var timePassed = (Date.now() - t) / 1000;
t = Date.now();
if(y <= 350) {
speed += 50 * timePassed;
y += speed*timePassed;
}
if(y > 350) {
count = 0
}
And draw function should call inside onclick event
+ 2
Ok bro thx
+ 1
Ok thx bro
0
Bro can you tell why ball
not falling down