How to use .then() ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to use .then() ?

Hello world ! I'm trying to add some delay in my programs but I don't want my program to be async. I found that using .then() should work but I'm unable to make it work... Every time it just crash. Here is a little code I made to test the .then() method : https://code.sololearn.com/Wm39JFPyvywC/?ref=app

4th Nov 2019, 1:36 PM
Romain P.
Romain P. - avatar
1 Answer
0
Hm, I don't think it is possible without using async/await inside a loop.
10th Nov 2019, 9:30 AM
Veliside
Veliside - avatar