<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/async-is-built-on-an-idea-you-can-see-in-yield-snkzczte1" -->

---
title: async Is Built on an Idea You Can See in yield | daily.dev
description: Async/await in JavaScript is explained through the lens of generator functions and the yield keyword, arguing that both mechanisms share a similar mental...
canonical: https://daily.dev/posts/async-is-built-on-an-idea-you-can-see-in-yield-snkzczte1
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: async Is Built on an Idea You Can See in yield | daily.dev
og:description: Async/await in JavaScript is explained through the lens of generator functions and the yield keyword, arguing that both mechanisms share a similar mental...
og:url: https://daily.dev/posts/async-is-built-on-an-idea-you-can-see-in-yield-snkzczte1
og:image: https://api.daily.dev/og/posts/snkZCzTE1.png
og:image:alt: async Is Built on an Idea You Can See in yield
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# async Is Built on an Idea You Can See in yield

**[Byte Corner](https://daily.dev/sources/bytecorner)** · [@mbos](https://daily.dev/mbos) · 1 min read · 2 upvotes · 0 comments

## Summary

Async/await in JavaScript is explained through the lens of generator functions and the yield keyword, arguing that both mechanisms share a similar mental model: suspending execution and handing control back to the runtime, then resuming later when a value (or Promise) is ready, rather than literally 'waiting'.

## Content

`await` feels like JavaScript is simply waiting.

That's not really what's happening.

The async function can suspend its execution, give control back to JavaScript, and continue later when the Promise is ready.

Generators make this idea much easier to see with `yield`.

Different mechanisms. Surprisingly similar mental model.

[👉 Read More about it here 👈](https://bytecorner.dev/articles/async-is-built-on-an-idea-you-can-see-in-yield)

#Javascript #Web Development #Decision

## Similar posts on daily.dev

- [Practical Introduction to Async Generators in JavaScript](https://daily.dev/posts/practical-introduction-to-async-generators-in-javascript-tyduw2cq4) · Telerik · 1 upvotes · 0 comments
- [From Spaghetti Effects to Saga Pipelines](https://daily.dev/posts/from-spaghetti-effects-to-saga-pipelines-zrgbfh1im) · ITNEXT · 0 upvotes · 0 comments
- [The Async Mistake That Makes JavaScript Code Lie to You](https://daily.dev/posts/the-async-mistake-that-makes-javascript-code-lie-to-you-b9d5ujlbf) · Medium · 4 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/async-is-built-on-an-idea-you-can-see-in-yield-snkzczte1)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/async-is-built-on-an-idea-you-can-see-in-yield-snkzczte1","headline":"async Is Built on an Idea You Can See in yield","text":"Async/await in JavaScript is explained through the lens of generator functions and the yield keyword, arguing that both mechanisms share a similar mental model: suspending execution and handing control back to the runtime, then resuming later when a value (or Promise) is ready, rather than literally 'waiting'.","url":"https://daily.dev/posts/async-is-built-on-an-idea-you-can-see-in-yield-snkzczte1","datePublished":"2026-10-01T21:03:19.138Z","dateModified":"2026-10-02T15:58:33.303Z","author":{"@type":"Person","name":"Matej Bošnjak","url":"https://daily.dev/mbos","image":"https://lh3.googleusercontent.com/a/ACg8ocIAnljz4vtpgYdXGAdl9NuMuQ8mAa6J_OteOt91EfP2WNlcicOw=s96-c","description":"Full Stack Developer","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":1980}},"image":"https://media.daily.dev/image/upload/s--x_hJa1_s--/f_auto/v1790888599/posts/snkZCzTE1?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/bytecorner","name":"Byte Corner"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Byte Corner","item":"https://daily.dev/squads/bytecorner"},{"@type":"ListItem","position":3,"name":"async Is Built on an Idea You Can See in yield"}]}
```

