How to use Object.prototype.toString.call () in js
This article mainly shows you "how to use Object.prototype.toString.call () in js". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to use Object.prototype.toString.call () in js".
Object.prototype.toString.call () uses the prototype method toString of the Object object, uses call to change the prince of the raccoon cat, and borrows the toString method of Object
Var a = Object.prototype.toString; console.log (a.call (2)); console.log (a.call (true)); console.log (a.call ('str')); console.log (a.call ([])); console.log (a.call (function () {})); console.log (a.call ({})); console.log (a.call (undefined)); console.log (a.call (null)) The above is all the content of the article "how to use Object.prototype.toString.call () in js". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!