刘述新的博客


  • Home

  • Categories

  • Archives

  • Tags

  • About

interviewRoad-1

Posted on 2020-05-20 | In interview

问题

1、JS 为什么是单线程的? 为什么需要异步? 单线程又是如何实现异步的呢?

相关申引:
这段 setTimeout 代码什么意思? 我们一般说: 3 秒后,会执行 setTimeout 里的那个函数

1
2
3
setTimeout(function () {
console.log("执行了");
}, 3000);
# 日常一问
JavaScript 事件循环(event loop)
ES6之--异步函数
  • Table of Contents
  • Overview

shuxinliu

31 posts
18 categories
26 tags
  1. 1. 问题
    1. 1.1. 1、JS 为什么是单线程的? 为什么需要异步? 单线程又是如何实现异步的呢?
© 2020 shuxinliu
Powered by Hexo
|
Theme — NexT.Muse v5.1.4