How can you call async from non-async function?

176 views   Javascript  2020.09.13


I am praticing async and await but It comes to where I want to call async from non-async but this simple program has me completely stuck. Actually I am developer who are new to async/await. How can I get rid of this trouble? I only return output in async function and I want to get/call it in regular function like this: async function makeAsyncData(unknown) { await new Promise(resolve => setTimeout(resolve, 2000)); return unknown; } function getAsyncData(data) { ... } getAsyncData("Data to display...");

Answers, ideas and Comments

» 27 ideas

 • 4 days ago
https://prednisonebuyon.com/ - Prednisone »

0 



 • 1 week ago
http://buyneurontine.com/ - gabapentin brand name »

0 



 • 1 week ago
0 



 • 1 week ago
Kamagra Oral Jelly Prix »

0 



 • 2 weeks ago
0 



 • 2 weeks ago
0 



 • 2 weeks ago
https://buyzithromaxinf.com/ - valtrex without rx »

0 



 • 3 weeks ago

0 



 • 3 weeks ago
We spent a lot of time at her home. Maybe so her mother could keep an eye on us. Mrs. Spencer made sure to be around, offering drinks, snacks, chit chat. I noticed that she was fairly young herself. Granted at my age, anyone over 25 was old, but she was probably mid-30s, divorced. If she was a indiction of how Carley would develop, maybe I should wait. Mrs. Spencer had fuller breasts and a nice butt. She appeared to be in great shape for her "advanced" age. I knew she was keeping an eye on me as much as I was on her and her younger daughter. Her eldest, Sharon was away at college at the time. With Mrs. Spencer around we mostly limited ourselves to holding hands and sneaking in a few light kisses. One day Mrs. Spencer caught us by surprise walking in as I'd slid my hand up from Carley's stomach to rub her right breast through her shirt. She didn't really need a bra yet, so I could feel her nipple, hard, through her shirt. Just this much contact had me hard also. https://sites.google.com/view/N9vEJ4pkKj2WWLX5 https://sites.google.com/view/eUX4LZJy1xcVpakj

don_rep__23092021_164109_118.
0 



 • 3 weeks ago
Quiniela Con Propecia »

0 



 • 3 weeks ago
https://buyplaquenilcv.com/ - Plaquenil »

0 



 • 3 weeks ago
https://buylasixshop.com/ - buy furosemide baikal-pharmacy.com »

0 



 • 3 weeks ago
Clomid Produit »

0 



 • 3 weeks ago

0 



 • 3 weeks ago
Generic Propecia Available In Us »

0 



In order to go deep, share any relevant idea or posting solution to some questions, You have to sign in or create a new account if you don't have one. And get Donnekted(connected)




Log in now  Join the Team

This site is for sharing topics, questions, answers, experiences or other contents related to different stuffs, especially technology. For existing users, They can make any topic(post) to discuss about in hope for ideas or any result from other people from different communities. In order to get involved, Get donnekted(connected) by Joining us here!