Travis build: 78
This commit is contained in:
@ -8,7 +8,10 @@ The callback function, `fn`, takes three arguments (the current character, the i
|
||||
|
||||
```js
|
||||
const mapString = (str, fn) =>
|
||||
str.split('').map((c, i) => fn(c, i, str)).join('');
|
||||
str
|
||||
.split('')
|
||||
.map((c, i) => fn(c, i, str))
|
||||
.join('');
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user