Definitely this trash called Javascript is dead! I give up to use this technology :-1:
The samples of Nodejs site doesnt work!
Or team doesn't update site, or .... throw it to the trash.
https://nodejs.org/dist/latest-v10.x/docs/api/synopsis.html
https://nodejs.org/en/docs/guides/getting-started-guide/

I found a solution on another site: https://www.w3schools.com/nodejs/met_http_createserver.asp

PLEASE team: update at least the beginer's samples.
I give up to use this technology
Well, bye then. But next time please the right forum, nodejs/help..
@codesearcher
Please don't be angry. There are no issues with Node.js or it's documentation. You are using old version of Node.js (according to the stack trace, I suppose it is v0.10.25). The current version is v10.5.0.
Node.js v0.10.25 doesn't support arrow functions (the => token you're seeing is part of an arrow function, they are introduced in Node.js v4.x). The W3schools tutorial you've found is written using standard function notation, so it works in your version.
I would suggest you to update your Node.js (you can check the version of your node by running node -v from the command prompt). Hope it helps.
Most helpful comment
@codesearcher
Please don't be angry. There are no issues with Node.js or it's documentation. You are using old version of Node.js (according to the stack trace, I suppose it is v0.10.25). The current version is v10.5.0.
Node.js v0.10.25 doesn't support arrow functions (the
=>token you're seeing is part of an arrow function, they are introduced in Node.js v4.x). The W3schools tutorial you've found is written using standard function notation, so it works in your version.I would suggest you to update your Node.js (you can check the version of your node by running
node -vfrom the command prompt). Hope it helps.