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 函數?什麼場景下使用事件?這兩種方法能夠一塊兒使用嗎?
相關文章
相關標籤/搜索