+ 4

Is there something I can use instead of all those setTimeouts from Javascript line 76 and below?

https://code.sololearn.com/WEMz4oBs2581/?ref=app

12th Oct 2019, 5:11 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
3 odpowiedzi
+ 1
The way you did is called callback hell, it's a bad coding practice, use Promise or async/await to get rid of callback hell.
13th Oct 2019, 8:14 AM
Calviղ
Calviղ - avatar
13th Oct 2019, 9:35 AM
Calviղ
Calviղ - avatar
+ 1
Better way is to use async/await method https://code.sololearn.com/WWbf38rSVv37/?ref=app
13th Oct 2019, 9:36 AM
Calviղ
Calviղ - avatar