'The returned value of toString :-)

I know this is a strange question, but it has been on my mind for some time. Why does toString returns object for the first part of the returned value. Like this -> [object ...].

odd question :/

let func = Object.prototype.toString;

alert( func.call(123) ); // [object Number]
alert( func.call(null) ); // [object Null]
alert( func.call(alert) ); // [object Function]

here's the code.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source