Very easy and simple solution in JavaScript. Wow. (0_o)
Code\n\n/**\n * @param {number[]} nums\n * @param {Function} fn\n * @param {number} init\n * @return {number}\n */\nvar reduce = function(nums, fn, init) {\n   
# Code\n```\n/**\n * @param {number[]} nums\n * @param {Function} fn\n * @param {number} init\n * @return {number}\n */\nvar reduce = function(nums, fn, init) {\n    for(let i = 0; i < nums.length; i++) {\n        init = fn(init, nums[i])\n    }\n    return init\n};\n```
['JavaScript']