const asyncFunction = async () => "HELLO";
const main = async () => {
const value = asyncFunction();
console.log(value === "HELLO" ? "true" : "false");
};
main();
Output: false
asyncFunction()
returns a promise not the resolved value.
Thanks for reading π
Follow @codedrops.tech for more.
Instagram β Twitter β Facebook
Micro-Learning β Web Development β Javascript β MERN stack
codedrops.tech
Projects
File Ops - A VS Code extension to easily tag/alias files & quick switch between files
Top comments (0)