The for…in loop iterates over the enumerable properties of an object.It is commonly used for objects, but can also be used with arrays (with caution).
1.Syntax
- variable → receives property key (string) on each iteration
- object → object whose enumerable properties will be iterated
