DEV Community

Discussion on: PHP 8 features I wish also existed in JavaScript

Collapse
 
ogrotten profile image
ogrotten

The reason js doesn't have a couple of these is that the same thing can be accomplished in a similar amount of code with already existing features. Therefore, adding them doesn't truly make things better. Why add a named parameter feature if it's already doable with an object?

Collapse
 
tomaszs2 profile image
Tom Smykowski

It is not the same. Named parameters are enforced. Object params are not