Async function returning promise, instead of value
问题 I'm trying to understand how async/await works in conjunction together with promises. Code async function latestTime() { const bl = await web3.eth.getBlock('latest'); console.log(bl.timestamp); // Returns a primitive console.log(typeof bl.timestamp.then == 'function'); //Returns false - not a promise return bl.timestamp; } const time = latestTime(); // Promise { <pending> } Issue As far as I understand, await should be blocking and in the code above it seemingly blocks returning an object bl