Correct a typo in "slice".

This commit is contained in:
Shlomi Fish
2017-12-12 12:55:59 +02:00
parent f5d0a9dd31
commit da37e7d585
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
### Capitalize first letter
Use `sice(0,1)` and `toUpperCase()` to capitalize first letter, `slice(1)` to get the rest of the string.
Use `slice(0,1)` and `toUpperCase()` to capitalize first letter, `slice(1)` to get the rest of the string.
```js
var capitalize = str => str.slice(0, 1).toUpperCase() + str.slice(1);