That is intentional.
The second return value is [3, undefined] because index 0 is 3 and index 1 is undefined since it's reading beyond the end of the right side value (which is treated as an iterable.)
It it had returned a non-iterable value instead of an array, it would have errorred.
I suggest you avoid destructuring in the for..of. That way you can check the return value and if it's an array, check its length to make sure it's 2. Then do the destructuring step afterward.