You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
just the same reasoning you don't have .forEach on Object https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
they are different, do different things as you pointed out one of them doesn't have indexes you can pretend it does, but only a derived state like entries has them as that is not guaranteed to be stable
other examples for..in and for..of they are separate things
Activity
void-mAlex commentedon May 8, 2025
just the same reasoning you don't have .forEach on Object
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
they are different, do different things as you pointed out one of them doesn't have indexes you can pretend it does, but only a derived state like entries has them as that is not guaranteed to be stable
other examples for..in and for..of they are separate things