4 ms·
Actually, for ... in does both. It is you who doesn't think that loop does what it actually does. Please read the spec and verify with your favorite JS runtim
by likeclockwork 5y ago
Actually, for ... in does both.
It is you who doesn't think that loop does what it actually does.
Please read the spec and verify with your favorite JS runtime before continuing this argument.
- zkldi 5y agofor (x in [6,1,6,2,6,3]) { console.log(x); } Please run this in your browser console and tell me if it iterates over the elements of the array.