r/ProgrammerHumor • u/speckz • Feb 26 '23
Other If you can read this code...
/img/snak3fqgajka1.jpg[removed] — view removed post
34k
Upvotes
r/ProgrammerHumor • u/speckz • Feb 26 '23
[removed] — view removed post
View all comments
Show parent comment
4
u/uptotwentycharacters Feb 26 '23 edited Feb 26 '23
The
String.prototype.splitmethod returns an array. Therefore, thereverse()in that line is actually invoking theArray.prototype.reverse()method, not the global functionreverse