1. function typeOf(obj) {
    2. return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase()
    3. }
    4. typeOf([]) // 'array'