Loading topic
<script> tag change when your code runs.3 min readnode --version should print a version number such as v22.11.0.2 min readnode command and know basic import syntax. Later chapters cover module systems and async patterns in more depth. This chapter covers the four built-in modules you will use most often.2 min readnode and load a script in a web page, which the previous chapters covered. It also assumes you know basic JavaScript functions and objects.2 min readsetTimeout calls, and that you know how to run a script in the browser and with node. It explains the scheduling model the browser and Node.js share, and the places where Node.js adds its own phases.3 min readnode, and that you know how ES modules differ from CommonJS. Each runtime gives your code a global object. The global object holds the host APIs, and its name depends on where the code runs. Detecting the environment 2 min readasync/await, and the differences between window, globalThis, and process that the earlier chapters covered. The goal is a module that runs unchanged in a browser and in Node.js, with no build step and no runtime checks scattered through it.2 min readnode, and read basic async code. It covers the debugging workflow both runtimes share: pause execution, inspect values, then step through code. The browser and Node.js use the same debugger protocol, so once you learn the br3 min readnode, and use the built-in fs module from earlier chapters. It also assumes you are comfortable with async/await.3 min readnode, that you know the difference between ES modules and CommonJS, and that you are comfortable working in a terminal. It covers how npm manages third-party code and why browser code usually goes through a bundler before it ships.3 min read