From 8b4f5a7e8c53d9a53cf7c261dae6665c27553cb3 Mon Sep 17 00:00:00 2001 From: Asabeneh Date: Sat, 16 Apr 2022 12:18:04 +0300 Subject: [PATCH] minor correction --- 18_Day_Promises/18_day_promises.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/18_Day_Promises/18_day_promises.md b/18_Day_Promises/18_day_promises.md index 22b0c67c..50545f86 100644 --- a/18_Day_Promises/18_day_promises.md +++ b/18_Day_Promises/18_day_promises.md @@ -197,7 +197,7 @@ square(2) PromiseĀ {: 4} ``` -The word _async_ in front of a function means that function will return a promise. The above square function instead of a value it returned a promise. +The word _async_ in front of a function means that function will return a promise. The above square function instead of a value it returns a promise. How do we access the value from the promise? To access the value from the promise, we will use the keyword _await_. @@ -206,6 +206,7 @@ const square = async function (n) { return n * n } const value = await square(2) +console.log(value) ``` ```sh