1setTimeout(function () {
2 // ...
3 }, 10000);
4
5// or
6
7.then(() => {
8 // ...
9 ({ timeout: 10000 });
10 });
1timeout(ms) { //pass a time in milliseconds to this function
2 return new Promise(resolve => setTimeout(resolve, ms));
3 }