P
P
purplestrm2020-05-08 21:03:52
JavaScript
purplestrm, 2020-05-08 21:03:52

Why does console.log output an array (underlined in red), while return returns a promise (underlined in yellow)?

5eb59e4bf312f890311486.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-05-08
@purplestrm

Because an async function, if you call it directly without await, of course it will return a promise.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question