Kebab file names

This commit is contained in:
Angelos Chalaris
2023-04-27 21:58:35 +03:00
parent 1d189c709a
commit 61200d90c4
440 changed files with 0 additions and 0 deletions

19
snippets/to-char-array.md Normal file
View File

@ -0,0 +1,19 @@
---
title: String to character array
tags: string
cover: waving-over-lake
firstSeen: 2020-10-08T15:17:22+03:00
lastUpdated: 2020-10-08T15:17:22+03:00
---
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']
```