Advertisement
TlalocTev

JS classof

Mar 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function classof(o) {
  2.     if (o === null) return "Null";
  3.     if (o === undefined) return "Undefined";
  4.     return Object.prototype.toString.call(o).slice(8,-1);
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement