According to the MDN page at for each…in loop, this construct is deprecated. Is there an alternative that does exactly the same thing? The for…of loop does not iterate over non-integer (own enumerable) properties. If there isn’t an alternative, why did they deprecate it then?
Share
A
for ... inloop in which the first thing you do in the block of code is to copyfoo[propertyname]to a variable.