---
title: "The Problem with Returning Values from Async Await Functions"
url: https://daily.dev/posts/the-problem-with-returning-values-from-async-await-functions-r-qtt0ki
source_url: https://javascript.plainenglish.io/problem-with-returning-values-from-async-await-function-javascript-e99c94a47ca5
type: article
source: "JavaScript in Plain English"
published: 2021-08-09T13:21:18.649Z
updated: 2021-10-07T14:17:10.317Z
tags: ["javascript"]
reading_time: 2
upvotes: 57
comments: 6
language: 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.

# The Problem with Returning Values from Async Await Functions

**[JavaScript in Plain English](https://daily.dev/sources/jsPlainEnglish)** · 2 min read · 57 upvotes · 6 comments

## Summary

Async and await are syntactic sugars for promise nesting. Where await will block the main thread until the promise is resolved. Can you guess the output of below snippet? You’re wrong, the output is 1. Because an async function always returns a promise and rather resolving the promise in above example we are trying to extract the value out of it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://javascript.plainenglish.io/problem-with-returning-values-from-async-await-function-javascript-e99c94a47ca5>

## Community discussion

Top comments from developers on daily.dev.

**@russelldsanders** · 3 upvotes

> Not sure this is exactly a problem with anything... This is just how Promises are intended to work. The title smells slightly of clickbait making it sound like there's an issue without a solution

**@ignusg** · 2 upvotes

> For newcomers, before you do anything with async await you have to learn how promises work, how they resolve and how to access their values.
>
> Async await is just syntactic sugar around them. You’ll do more harm than good if you use this syntax without understanding how it works.
>
> I see posts like these every couple of months explaining async await never even mentioning promises, talking about confusing syntax and weird behaviour.

**@grayson** · 1 upvotes

> The return value returns {Promise} without using await on return

**@mrgrigri** · 1 upvotes

> The best solution would be to use top-level await. But until it's widely supported, your solution, or a IIFY would work.

**@lakshya\_munjal** · 0 upvotes

> I got into a similar problem during my internship days. It's a must read for beginners.
> Easy to understand, yet we can get it wrong sometimes.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/the-problem-with-returning-values-from-async-await-functions-r-qtt0ki)
