Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const someAsyncFunction = () => {
- return new Promise((resolve, reject) => {
- setTimeout(() => {
- resolve({
- param1: 1,
- param2: 2,
- param3: 3
- }, 3000)
- })
- })
- }
- const test = async () => {
- const result = await someAsyncFunction()
- // do some tests here
- }
- test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement