Modify the code below so that it uses async/await instead of promises. ```function fetchData() { return new Promise((resolve, reject) => { setTimeout(() => resolve("data received"), 1000); }); } function processData() { fetchData().then(data => { console.log(data); }).catch(error => { console.error(error); }); }```
Features and Functions
Browser Pro showcase and sample chats
No sample chats found.
By clicking
“Accept All Cookies”
, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our
Privacy Policy
for more information.