//find type of object function typeOf (obj) { return {}.toString.call(obj).split(' ')[1].slice(0, -1); }