2 ms·
> how prior use in mathematics or other languages has any bearing It counts, because it makes it familiar to many people. Had JS introduced this syntax withou
by jraph 4y ago
> how prior use in mathematics or other languages has any bearing
It counts, because it makes it familiar to many people.
Had JS introduced this syntax without it being anywhere else I would be completely with you: it would just be weird and unnecessarily complicated.
I find this syntax very clear too (though I still prefer function () { ... } for most functions). It has the merit to make some code using small functions, often somewhat functional, lighter to read. But this is a matter of taste, of course.