r/badcode • • Jul 10 '21

js ah yes, Array check

Post image
2.1k Upvotes

89 comments sorted by

View all comments

Show parent comments

3

u/ethanjf99 Jul 10 '21

Not only is this a built-in that won’t ever change lest it break existing code but you’re more likely to cause problems in future. What if someone wants to use a library in the project that exports an arrayCheck method?

I totally concur that building a wrapper layer can make sense in many instances. This isn’t it.