363 B
363 B
title, type, language, tags, cover, dateModified
| title | type | language | tags | cover | dateModified | |
|---|---|---|---|---|---|---|
| Value is symbol | snippet | javascript |
|
naming-conventions | 2020-09-15T16:28:04+03:00 |
Checks if the given argument is a symbol.
- Use
typeofto check if a value is classified as a symbol primitive.
const isSymbol = val => typeof val === 'symbol';
isSymbol(Symbol('x')); // true