typeof Array and Object
Wed Oct 14 2020 08:46:59 GMT+0000 (UTC)
Saved by
@snigdhakhurana10
//typeof []
console.log(typeof []);
//typeof {}
console.log(typeof {});
//To get actual type
//typeof []
console.log(Object.prototype.toString.call([]));
//typeof {}
console.log(Object.prototype.toString.call({}));
content_copyCOPY
Comments