Add isNil and isUndefined

This commit is contained in:
Angelos Chalaris
2018-01-16 16:50:21 +02:00
parent ee4abbc2a7
commit 2d9b00bb61
3 changed files with 29 additions and 0 deletions

13
snippets/isUndefined.md Normal file
View 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
```