AlgoDaily Solution
1function detectType(data) {
2 return Object.prototype.toString
3 .call(data)
4 .slice(1, -1)
5 .split(" ")[1]
6 .toLowerCase();
7}
Community Solutions
Community solutions are only available for premium users.
Access all course materials today
The rest of this tutorial's contents are only available for premium members. Please explore your options at the link below.
xxxxxxxxxx
function detectType(data) {
return Object.prototype.toString
.call(data)
.slice(1, -1)
.split(" ")[1]
.toLowerCase();
}
OUTPUT
Results will appear here.