+ 3
Javascript help needed
I am learning JavaScript, i am trying to create a code to move 4 boxes to left right top bottom.... please tell me where i am wrong and help to create this... advance thanks for your time https://code.sololearn.com/WbfaX4K2OcW6/?ref=app
2 Respuestas
+ 16
https://code.sololearn.com/WXD70oT12cYa/?ref=app
+ 16
Bugs:
You used top+1 instead of top+=1
You used element.style.right and .bottom but are reducing their value instead of increasing them.
Suggestion:
Use only 2 of .right .left .top and .bottom . Otherwise things might be unexpected.