[ad_1]
You have misspelled length in the first loop.
Also consider using for-in loop like:
for (property in obj) {
if (obj.hasOwnProperty(property)) {
//...
}
}
[ad_2]
solved Nothing displaying in console when using console.log with if statements in for loops [closed]