From a design point of view, itβs hard to say what the corresponding k in null return value should be ( true clearly wrong, but false is misleading), but it's easy to say that in for-in you just have to skip the loop.
I do not agree with this decision at all - I think that for (k in null) should throw an error, especially if it works in strict mode. But you can see how the difference arises.
Chris hayes
source share