Checks if the given argument is a symbol.
typeof
to check if a value is classified as a symbol primitive.const isSymbol = val => typeof val === 'symbol';
isSymbol(Symbol('x')); // true
Would you like to help us improve 30 seconds of code?Take a quick survey
JavaScript, Type
Checks if the given argument is an async
function.
JavaScript, Type
Checks if the given argument is a generator function.
JavaScript, Type
Checks if the given argument is a function.