Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But do they make much of a difference? You have always been able to write:

    myArray.sort(function(a,b){return a-b})
People for some reason treat this syntactic sugar like it gives them some new fundamental ability.


Oh Javascript would be much better if it could only be syntactic sugar...

`function(a,b){return a-b;}` is different from `(a,b) => a - b`

And `function diff(a,b) {return a-b;}` is different from `const diff(a,b) => a - b;`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: