0

I was made a Simple Game with Javascript but...

This is game java secript code is to lengthy, any body can tell me how can we write code shortly.?? Thanks in Lenghty Code bits : https://code.sololearn.com/WM2ozl4S6Njn/?ref=app

21st Jan 2021, 2:11 PM
Sajid Ali
Sajid Ali - avatar
4 Antworten
+ 1
Sajid Ali See here I have minimised JS code using loop and also you need to clear timeout after wins. Also I have changed box to box0 in html. https://code.sololearn.com/W8I4yokuEYC8/?ref=app
21st Jan 2021, 3:02 PM
A͢J
A͢J - avatar
+ 1
I Am AJ ! Thank you so much 🙏
21st Jan 2021, 3:44 PM
Sajid Ali
Sajid Ali - avatar
0
Sajid Ali As I see everything is same just variable name changed like box1, box2, box3, top1, top2, top3....so you can try loop and make variable dynamic.
21st Jan 2021, 2:24 PM
A͢J
A͢J - avatar
0
I Am AJ ! Can you write ? How can we adjust variable in loop ?
21st Jan 2021, 2:34 PM
Sajid Ali
Sajid Ali - avatar