1. View all native attributes on div HTML5

var item ,result = ''
    for (item in div) {
      result += ' | ' + item
    }
console.log(result)
Copy the code

2. The MAP loop is not terminated

3. The for in loop iterates through the values of the attributes on the prototype in an indeterminate order. If you only need to get instance properties of an object, you can use hasOwnProperty to filter.