Fully renamed and updated everything, tagged, built
This commit is contained in:
11
snippets/reverseString.md
Normal file
11
snippets/reverseString.md
Normal file
@ -0,0 +1,11 @@
|
||||
### reverseString
|
||||
|
||||
Reverses a string.
|
||||
|
||||
Use array destructuring and `Array.reverse()` to reverse the order of the characters in the string.
|
||||
Combine characters to get a string using `join('')`.
|
||||
|
||||
```js
|
||||
const reverseString = str => [...str].reverse().join('');
|
||||
// reverseString('foobar') -> 'raboof'
|
||||
```
|
||||
Reference in New Issue
Block a user