From fcd34d3f5c7d117d6a7484b6a1f9a7508581385b Mon Sep 17 00:00:00 2001 From: ceo <39812139+ceo@users.noreply.github.com> Date: Tue, 29 Dec 2020 12:38:36 -0300 Subject: [PATCH] Fix async await syntax --- javascript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript.md b/javascript.md index 04896a0..98260c5 100644 --- a/javascript.md +++ b/javascript.md @@ -1446,7 +1446,7 @@ const getSuggestions = async () => { const wordQuery = inputField.value; const endpoint = `${url}${queryParams}${wordQuery}`; try{ -const response = __~await~__ __~fetch(endpoint, {cache: 'no-cache'}); +const response = await fetch(endpoint, {cache: 'no-cache'}); if(response.ok){ const jsonResponse = await response.json() }