DEV Community

Discussion on: ⭐️🎀 JavaScript Visualized: Promises & Async/Await

Collapse
 
silverbullet069 profile image
VH • Edited

This is interesting, you use Promise.resolve function to return a Promise directly, instead of using a callback function that return that Promise.resolve function. This way, you have resolved your Promise right in line 1, not in line const res = await x.