Last active
September 10, 2018 13:28
-
-
Save hulefei/c96b6cafeb994ad42e60a3b4f1d2e430 to your computer and use it in GitHub Desktop.
不区分函数是同步函数还是异步操作
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//const f = () => console.log('now'); | |
const f = Promise.resolve().then(()=>console.log('now')); | |
(async () => f())(); | |
console.log('next'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment