Build README
This commit is contained in:
@ -74,10 +74,10 @@ var average = arr =>
|
|||||||
|
|
||||||
### Capitalize first letter
|
### Capitalize first letter
|
||||||
|
|
||||||
Use `toUpperCase()` to capitalize first letter, `slice(1)` to get the rest of the string.
|
Use `sice(0,1)` and `toUpperCase()` to capitalize first letter, `slice(1)` to get the rest of the string.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var capitalize = str => str[0].toUpperCase() + str.slice(1);
|
var capitalize = str => str.slice(0, 1).toUpperCase() + str.slice(1);
|
||||||
```
|
```
|
||||||
|
|
||||||
### Count occurrences of a value in array
|
### Count occurrences of a value in array
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
### Capitalize first letter
|
### Capitalize first letter
|
||||||
|
|
||||||
Use `toUpperCase()` to capitalize first letter, `slice(1)` to get the rest of the string.
|
Use `sice(0,1)` and `toUpperCase()` to capitalize first letter, `slice(1)` to get the rest of the string.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var capitalize = str => str.slice(0, 1).toUpperCase() + str.slice(1);
|
var capitalize = str => str.slice(0, 1).toUpperCase() + str.slice(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user