First Example
console.log('Hello Node'); save as hello.js; run node hello.js. That is first example. Then a tiny server: require('http') or import, listen on 3000, res.end('Hello').
If node is not recognised, Node isn’t installed or PATH is old — open a new terminal.
Trap — writing <script> in a .js file you run with node. That’s browser HTML.
Exam tip
console.log('Hello Node'); node hello.js