DEV Community


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

ogrotten profile image

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?

tomaszs2 profile image
Tomasz Smykowski

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