3 ms·
You could say it's a snipe at the weak type system that Javascript has. I dunno, as someone without much experience with Javascript, it is a little odd that ar
by CatMtKing 12y ago
You could say it's a snipe at the weak type system that Javascript has.
I dunno, as someone without much experience with Javascript, it is a little odd that arrays return the index alongside the value by default.
- xiaomai 12y agoarrays don't do that, but map() does. Normally in js you can just ignore arguments you don't care about, but it does lead to surprises like this one.
- anaphor 12y agoIt has little to do with the type system. Variadic arguments can be typed given a type system that supports it.
- deleted 12y ago[deleted]