https://www.geeksforgeeks.org/how-to-use-async-await-with-foreach-loop-in-javascript/
https://stackoverflow.com/questions/37764665/how-to-implement-sleep-function-in-typescript
Create a delay
function for visibility:
function delay(ms: number) {
return new Promise( resolve => setTimeout(resolve, ms) );
}
Have a function that prints out texts:
function getTrue(idex: number): boolean {
console.log('returnTrue start');
console.log(idex);
console.log('returnTrue end');
return true;
}
Using for loop:
...
async function main() {
console.log('start');
for (let i = 0; i < 5; i += 1) {
await delay(1000);
await getTrue(i);
}
}
main();
typescript
async await
loop
Vercel is an end-to-end platform for developers, that allows you to create and deploy your web application. Vercel provides the following features to enable you to serve fast and personalized content to your users:
Jun 17, 2023https://browsee.io/blog/chropath-a-quick-way-to-get-and-verify-xpath-and-css-selectors/
May 25, 2023https://docs.microsoft.com/en-us/sql/connect/jdbc/working-with-a-connection?view=sql-server-ver15
May 25, 2023https://www.sitepoint.com/bdd-javascript-cucumber-gherkin/ https://vinodmuralidharan.medium.com/cucumber-js-data-table-guide-a2447b74c86e Different between the data tables and Examples At least two columns .feature file Scenario: Category dropdown When the user navigates to the home page When the user selects a category from the category dropdown:
May 25, 2023or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up