Node.js 知识大挑战

  1. 请说明 Node.js 和 V8 的关系?Node 没有 V8 可否正常运行?
  2. How come when you declare a global variable in any Node.js file it’s not really global to all modules?
  3. Export 一个 Node 模块的 API 时,为何有时能够用 exports 有时却必须使用 module.exports
  4. 不用相对路径是否能够实现 require 本地文件(local files)?
  5. 一个应用是否能够同时使用某个包的多个不一样版本?
  6. 什么是 Event Loop?它是 V8 的一部分吗?
  7. 什么是调用栈 (Call Stack)?它是 V8 的一部分吗?
  8. setImmediate 和 process.nextTick 的区别?
  9. How do you make an asynchronous function return a value?
  10. 回调能和 promise 一块儿使用吗?若是能的话,有几种方式?
  11. What Node module is implemented by most other Node modules?
  12. spawnexec 与 fork 的主要区别?
  13. cluster 模块如何工做?它跟负载均衡的区别是?
  14. --harmony-* 标志是什么?
  15. 如何读取并检查 Node.js 进程的内存使用状况?
  16. 当调用栈和事件循环都为空时,Node 将会发生什么?
  17. V8 对象和函数模板是什么?
  18. 什么是 libuv? Node.js 怎么使用它的?
  19. 如何使 Node 的 REPL 始终使用 JavaScript 严格模式?
  20. 什么是 process.argv?它拥有哪些数据?
  21. 如何实如今 Node 进程退出前执行最后一个操做?这个能异步执行吗?
  22. 有哪些能够在 Node REPL 中使用的内置 dot commands?
  23. 除了 V8 与 libuv,Node 还有其它外部依赖吗?
  24. 进程 uncaughtException 事件有什么问题?它与 exit 事件有什么不一样?
  25. Node REPL 中 _ 的含义?
  26. Node 缓冲区(buffer)占用 V8 内存吗?它们大小可调吗?
  27. Buffer.alloc 与 Buffer.allocUnsafe 的区别?
  28. 缓冲区 (buffer) 上的 slice 与数组(array)上的区别?
  29. string_decoder 模块的做用?它与转换缓冲区为字符串有什么区别?
  30. require 函数的五个主要步骤?
  31. 如何检查本地模块 (local module) 是否存在?
  32. package.json 中 main 属性的做用?
  33. 什么是循环模块引用?如何避免?
  34. require 函数支持的自动尝试文件后缀是哪三个?
  35. 建立一个 http server 而且返回一个响应,为何 end() 函数是必须的?
  36. 什么场景下能使用 *Sync 方法?
  37. 如何仅打印多层嵌套对象的第一层?How can you print only one level of a deeply nested object?
  38. node-gyp 包的做用?
  39. 如何实现 exports, require 和 module 在每一个模块中均全局可用,可是在每一个模块中却不一样?
  40. 假设执行一个只有一行 console.log(arguments); 的 node 脚本,请问输出是什么?
  41. 如何实现一个模块既能被其余模块 require 引用又能直接经过 node 命令行调用?
  42. 请给出一个 node 中既可读又可写的内置流 (stream) 的例子?
  43. 在 node 脚本中执行 cluster.fork() 将会发生什么?
  44. What’s the difference between using event emitters and using simple callback functions to allow for asynchronous handling of code?
  45. console.time 的做用?
  46. What’s the difference between the Paused and the Flowing modes of readable streams?
  47. Node 命令的 --inspect 参数的做用?
  48. 如何从已经链接的套接字中读取数据?
  49. require 函数总会缓存引用的模块。若是须要屡次执行所引用模块中的代码,你会怎么作?
  50. 使用流 (stream) 时,什么场景下使用 pipe 函数?什么场景下使用事件?这两种方法能够一块儿使用吗?
相关文章
相关标签/搜索