Files
30-seconds-of-code/snippets/isString.md
Angelos Chalaris 8281457945 Updated examples
Removed duplicate and unnecessary examples.
2018-01-04 14:22:56 +02:00

14 lines
222 B
Markdown

### isString
Checks if the given argument is a string.
Use `typeof` to check if a value is classified as a string primitive.
```js
const isString = val => typeof val === 'string';
```
```js
isString('10'); // true
```