Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Object.prototype.toString.call () in js

Shulou Source: shulou.com Published: 2022-06-01 03:46:07 10月03日 Update

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!

Tags: Content articles methods learning help prototypes objects easy to understand more organization raccoons raccoons change princes knowledge ribbons industry information information channels channels research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft macOS Docker OPPO Reno Apple