console.log(Object.prototype.toString.call("This is string")); console.log(Object.prototype.toString.call(undefined)); console.log(Object.prototype.toString.call(0)); console.log(Object.prototype.toString.call(null)); console.log(Object.prototype.toString.call([])); console.log(Object.prototype.toString.call({})); |
And respective output is as below: |
[object String] [object Undefined] [object Number] [object Null] [object Array] [object Object] |
No comments:
Post a Comment