odin-javascript-exercises/reverseString/README.md

16 lines
566 B
Markdown
Raw Normal View History

# Exercise 03 - Reverse a String.
2017-08-17 14:19:17 -07:00
2019-07-13 03:07:37 -07:00
Pretty simple, write a function called `reverseString` that returns its input, reversed!
2017-08-17 14:19:17 -07:00
```javascript
reverseString('hello there') // returns 'ereht olleh'
```
You will notice in this exercise that there are multiple tests, after making the first one pass, enable the others one by one by deleting the `x` in front of the `it()` function.
2017-10-24 13:10:20 -07:00
2018-06-08 20:20:59 -07:00
## Hints
2017-10-24 13:10:20 -07:00
Strings in JavaScript cannot be reversed directly so you're going to have to split it into something else first.. do the reversal and then join it back together into a string.