Loading topic
<script> elements, when it fetches and runs them, and how the defer, async, and type="module" attributes change tha5 min readArray.prototype.map. It does not know what a web page, a button, or an HTTP request is. The browser adds those through host APIs, objects and functions it places in the global scope before your scr6 min readnode --version. The built-in modules (`6 min readdocument and fetch. Node.js hands you modules that reach the file system, the operating system process, and the network. This chapter covers the four you will use most often. fs reads and writes files, path builds file paths safely, process describes the running progr5 min readnode, and load a script in a web page with a <script> tag. It covers the two module systems you will meet in practice. You will see how each one loads code, how Node.js decides which one a file uses, and how 6 min readasync function, and have read the earlier chapters on engines and runtimes. The engine runs your code on a single thread with a call stack. The event loop belongs to the host. It decides which piece of code the engine runs next. Browser6 min readawait, and checking for a global with typeof. The examples need Node.js 205 min readnode, and write ES modules with import and export. You should also be comfortable with promises and async/await. Both runtimes share one debugging model, and the same Chrome DevTools interface works with each. Once y6 min readfetch, fs/promises, and starting a basic http server. You should also be able to run Node.js 22 or later from a terminal, because the permission flags shown6 min readimport and import.meta.url work. You also need a local web server for 6 min readnode command, and load a module script in an HTML page. Earlier chapters covered all three. Here you will add third-party code to a project with npm, see how Node.js finds that code on disk, and learn why the 5 min read