I'm getting started with Node and I see =>
is used for anonymous functions. I have not found this in JavaScript before. Is it Node.js specific? What's the name of this syntax? I searched but could not find anything.
Here below is an example.
process.on('exit', (code) => {
// do *NOT* do this
setTimeout(() => {
console.log('This will not run');
}, 0);
console.log('About to exit with code:', code);
});