Re:KindScript – A kinder JavaScript experience
by dchest on Sunday March 20, 2016 @12:12PM
(#11323425)
What is wrong with the following function
The implementation is wrong: you're using Object when you want to use Map. Object is not suitable for this, and seems like you know it, and it's in language specs.
Re:KindScript – A kinder JavaScript experience
by amelius on Sunday March 20, 2016 @12:36PM
(#11323529)
Yes, I stated beforehand that the implementation is wrong. My point is that it is not obvious from the implementation (and certainly not for beginners).
The implementation is wrong: you're using Object when you want to use Map. Object is not suitable for this, and seems like you know it, and it's in language specs.