3 ms·
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 synta
by NohatCoder 2y ago
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.
- marcosdumay 2y agoOh 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;`.