prefixed Array. to reduce(), sort(), map() methods in snippets.

This commit is contained in:
piyuesh
2017-12-13 17:41:45 +05:30
parent e9c534c395
commit b995e1bea1
11 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
### Average of array of numbers
Use `reduce()` to add each value to an accumulator, initialized with a value of `0`, divide by the `length` of the array.
Use `Array.reduce()` to add each value to an accumulator, initialized with a value of `0`, divide by the `length` of the array.
```js
const average = arr =>