摘要: 1、 console.log(1); setTimeout(function(){ console.log(2); },0) console.log(3) 打印顺序:132 为什么是1,3,2 js是单线程,同一时间只能做一件事,setTimeout是个异步任务,异步任务要挂起,放到任务队列,不立即 阅读全文
posted @ 2019-01-04 07:00 wzndkj 阅读(156) 评论(0) 推荐(0) 编辑