17 Dec 2017

Await loop over an object

I always rely on bluebird each / all to loop over an array. Until someday I meet the case where I need to use await loop over an object. Surprisingly, after trying on chrome inspector, for loop on object is very doable :

Above codes will print a text on variable k with delay every 1 second.

Tinggalkan Komentar?

Your email address will not be published.

*