UNPKG

30-seconds-of-code

Version:
14 lines (9 loc) 229 B
### isSymbol Checks if the given argument is a symbol. Use `typeof` to check if a value is classified as a symbol primitive. ```js const isSymbol = val => typeof val === 'symbol'; ``` ```js isSymbol(Symbol('x')); // true ```