# toCharArray

Canonical: https://www.wiki.jodisand.me/snippets/javascript/tochararray/


Converts a string to an array of characters.

- Use the spread operator (`...`) to convert the string into an array of characters.

```js
const toCharArray = s => [...s];
```

```js
toCharArray('hello'); // ['h', 'e', 'l', 'l', 'o']
```


