como usar o isSymbol no javascript es6
January 04, 2020
Checks if the given argument is a symbol.
Use typeof
to check if a value is classified as a symbol primitive.
const isSymbol = val => typeof val === 'symbol';
isSymbol(Symbol('x')); // true
January 04, 2020
Checks if the given argument is a symbol.
Use typeof
to check if a value is classified as a symbol primitive.
const isSymbol = val => typeof val === 'symbol';
isSymbol(Symbol('x')); // true