I am coming from PHP and Java background. I see the new syntax that uses arrows.
Can someone explain to me what this syntax do and how should I use it?
app.listen(port, (err) => {
if (err) {
return console.log('something bad happened', err)
}
console.log(`server is listening on ${port}`)
})
I'm specially confused about (err) => { //code } part.