For in Loop in JavaScript
For In Loop
The for-in loop is used for iterating over the enumerable keys of an object.
The for-in loop should be only used with objects and not with arrays
Syntax:-
for(let value in arr){
// code to be executed
document.write(value);
}