azl397985856 / fe-interview

宇宙最强的前端面试指南 (https://lucifer.ren/fe-interview)
Apache License 2.0
2.84k stars 260 forks source link

【每日一题】- 2019-08-30 - 如何判断接口是否异步? #26

Closed azl397985856 closed 4 years ago

azl397985856 commented 5 years ago

我们如何判断一个方法是同步的还是异步的,是否只要有回调函数就是异步?

比如react setState是同步还是异步,setTimeout是同步还是异步,console.log呢? 你自己怎么写一个异步的方法?

ps: 上面的很多都是伪问题, 你能看出来我问的有问题么?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.