NodeJS

Node.js is a JavaScript runtime, that means it can execute JavaScript outside of the browser.

alt

This enables us to use JavaScript for pretty anything, like using JavaScript for the backend.

Or for desktop applications.

This section will focus on node as a runtime, as well as how to use it for the backend.

example.js

Copy

console.log('Hello, World!')

The above script would normally need the browser to be executed.

But with node.js we can execute it as follows;

terminal

Copy

$ node example.js
Hello, World!