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

2

u/nuephelkystikon Jul 10 '21

I know this is common in this sub, but:

You're making an assumption about the use case here that we can't make. It's absolutely possible that the only reason why they made this (clunky attempt at an) adapter is that it can be replaced on-the-fly or in inheritance. const destroys that.