You probably haven't written modern JS. Since ~2016 (ES6) the language is basically completely different and really concise now; consider ES5:
function increment() {
var out = []
for (let i of [1,2,3,4,5]) {
out.push(i + 1)
}
return out
}
vs ES6:
const increment = () => [1,2,3,4,5].map(i => i + 1)
etc. Most people's experience with JS/TS has simply been before ES6 (which had massive problems, like `var` and `this` scoping etc.), it's really nice nowadays.
To go maximum pedant here, I want to say that you're somewhat conflating syntax improvements for stylistic shifts. Pre ES6 JS still allows for FP programming, so a more fair approximation of the Pre-ES6 code would be...
var increment = [1, 2, 3, 4, 5].map( function(num){ return num + 1 } )
The two big syntactic wins of modern JS are let/const over the filth that was var and the convenience of arrow functions over anonymous function literals.
I don't really understand your point of disagreement. I never claimed let/const/Arrow Functions were syntactic sugar, just that they were improved syntax. I don't see our two arguments as mutually exclusive, because I feel syntax can imply the addition of new features, as long as those features are directly tied to that syntax (by this definition, I would argue that JS classes are actually syntactic sugar, but that's a whole other can of worms).
I will concede that I failed to write a function definition, thanks for catching that. I guess I unintentionally refactored the outer function away because development brain took over? Sloppy on my part, regardless.
I would argue that extending "improved syntax" beyond readability to carry "addition of new features" blurs the lines between syntax and semantics.
The point was that modern JS is more convenient to use: Const/let, arrows, classes, proxies, async/await, generators, destructuring, default/rest/spread parameters, etc.
Even if you discard const/let/arrows as merely syntactic improvements (which they are not), you should not ignore the others - unless of course they are all syntactic improvements with added features at which point "syntax" lost its "meaning".
The problem with JS and large applications was never the verbosity but that you can do horribly mistakes without getting any feedback until runtime since your mistakes are valid JS, they just mean something else than what you meant.
I.e. due to the lack of typing this will fly just fine: