DEV Community

Discussion on: Do we even need if/else?

 
joelbonetr profile image
JoelBonetR 🥇

It will be available just when you import the file containing it, not less not more. It just depends on the project architecture. The only concern about setting string (or other data structure) methods like this is the possibility of ES adding a method with the same name and thus having to refactor it everywhere it's used (or deleting it if it's provided along the language)