JavaScript | Easy | Simple
\n\n# Code\njavascript []\n/**\n * @param {number[]} nums\n * @param {Function} fn\n * @param {number} init\n * @return {number}\n */\nvar reduce = function(num
\n\n# Code\n```javascript []\n/**\n * @param {number[]} nums\n * @param {Function} fn\n * @param {number} init\n * @return {number}\n */\nvar reduce = function(nums, fn, init) {\n    return nums.reduce(fn,init);\n};\n```
['JavaScript']