Add isNil and isUndefined
This commit is contained in:
13
snippets/isUndefined.md
Normal file
13
snippets/isUndefined.md
Normal file
@@ -0,0 +1,13 @@
|
||||
### isUndefined
|
||||
|
||||
Returns `true` if the specified value is `undefined`, `false` otherwise.
|
||||
|
||||
Use the strict equality operator to check if the value and of `val` are equal to `undefined`.
|
||||
|
||||
```js
|
||||
const isUndefined = val => val === undefined;
|
||||
```
|
||||
|
||||
```js
|
||||
isUndefined(undefined); // true
|
||||
```
|
||||
Reference in New Issue
Block a user