Introduction

Introduction

  • Nodejs allows to run JavaScript outside the browser
  • To test, we can create a new index.js file with console.log("Hello") and run it using Node node index.js (Node must be installed for this)
  • npm is Node’s Package Manager, it helps us to use other people’s code
  • Not all browser js can be run on node.js. Things like document.querySelector are not supported
  • The global object in node is called global which is similar to browser’s window
notion image
notion image
notion image
This nodejs.dev is a documentation site great for learning
notion image
Node can be run using the code runner extension
notion image
Node can be run from terminal
notion image
Keyboard shortcuts to run code runner
notion image
Node repl can be used to run in an interactive shell
notion image
notion image