398 B
398 B
title, type, language, tags, cover, dateModified
| title | type | language | tags | cover | dateModified | |
|---|---|---|---|---|---|---|
| Value is boolean | snippet | javascript |
|
book-stopper | 2020-09-15T16:28:04+03:00 |
Checks if the given argument is a native boolean element.
- Use
typeofto check if a value is classified as a boolean primitive.
const isBoolean = val => typeof val === 'boolean';
isBoolean(null); // false
isBoolean(false); // true