
- Software Engineer, Product
- Modern Technology stacks:
- So What is a Tech Stack?
- Frontend tech stack
- Backend tech stack
- How to choose/build a tech stack
- What is a CI/CD Pipeline?
- Software Business Analyst
- Node.js Express Back-end App
- Build React App With Java Backend
- Connecting React-Frontend and NodeJS/Express Backend Applications
- React-Frontend, Node.js/Express-Backend, MySQL Architecture
- React Frontend with a NodeJS/Express Backend SQL-Architecture
- So What is git ?
- Git vs GitHub
- Big O Notation


JavaScript async/await

JavaScript async/await
We use the async keyword with a function to represent that the function is an asynchronous function. The async function returns a promise.
The syntax of async function is:
Here,
- name - name of the function
- parameters - parameters that are passed to the function
Output
In the above program, the async keyword is used before the function to represent that the function is asynchronous.
Since this function returns a promise, you can use the chaining method then() like this:
Output
Halkaa kasii wada See more
https://www.programiz.com/javascript/async-await
We use the async keyword with a function to represent that the function is an asynchronous function. The async function returns a promise.
The syntax of async function is:
async function name(parameter1, parameter2, ...paramaterN) {
// statements
}
Here,
- name - name of the function
- parameters - parameters that are passed to the function
Example: Async Function
// async function example
async function f() {
console.log('Async function.');
return Promise.resolve(1);
}
f();
Output
Async function.
Since this function returns a promise, you can use the chaining method then() like this:
async function f() {
console.log('Async function.');
return Promise.resolve(1);
}
f().then(function(result) {
console.log(result)
});
Output
Async function
1
Full-Stack Engineer
