Add some examples

From the old test suite
This commit is contained in:
Angelos Chalaris
2020-04-16 23:01:19 +03:00
parent 719cc00a53
commit 5e42f0aaa4
5 changed files with 11 additions and 6 deletions

View File

@ -13,9 +13,11 @@ const isPrimitive = val => Object(val) !== val;
```js
isPrimitive(null); // true
isPrimitive(undefined); // true
isPrimitive(50); // true
isPrimitive('Hello!'); // true
isPrimitive(false); // true
isPrimitive(Symbol()); // true
isPrimitive([]); // false
```
isPrimitive({}); // false
```