Added hasOwnProperty on for loops