isSymbol
This determines if an object is of type
Symbol. Easiest way is to simply use typeof. If its value is 'object', we can then look into its >toString value.
console.log(typeof Symbol.toStringTag) console.log(Object.prototype.toString.call(Symbol.toStringTag))Output:
symbol [object Symbol]
Comments
Post a Comment