Hey guys I would like to know syntax to await my own constructed function.
async function func(){
const result = await ()=>{
return 2;
}
console.log(result);
}
This example results in [Function] I would like to get 2
I am not able to google it as I do not know how to name it even sorry :)