javascript reduce basic example
Table of Contents
Reduce is a function to transform an array to another something
1 Basic Example
input: votes
output: { angular: 3, react: 4, ember: 1, vanilla: 1 }
let votes = [ |
2 map and filter is also a reduce
// contents of doubled === doubleMapped |
Render by hexo-renderer-org with Emacs 25.2.1 (Org mode 8.2.10)