Post History
JavaScript (Node.js), 40 bytes f=(a,b,c=1)=>a.reduce((d,e)=>d+e*(c*=b)) Try it online!
Answer
#1: Initial revision
# [JavaScript (Node.js)], 40 bytes <!-- language-all: lang-javascript --> f=(a,b,c=1)=>a.reduce((d,e)=>d+e*(c*=b)) [Try it online!][TIO-khgx7ivi] [JavaScript (Node.js)]: https://nodejs.org [TIO-khgx7ivi]: https://tio.run/##TYwxb8MgEIV3/wpvuYspNFW3iFTq1ilLtjTDGbBC1ALiIB2q/HYXe6r0dNL7Tt@70Z3YZJ/KU4jWzfOkgcQojN6hPpDMzlbjAKxwrdvBbcFs9Yg4K9Wfrp77llvl0n@oY7cnfb6IlKNxzJKL9UHGABtLhTZiXAZT5Ss0f@Uu2BUD6cNv98@Ltcif7IuDqf1IcvryBZR4@2SF8pvSYgyEog3GBIjD@YLdA@G9TpPL0sRgqACtHOedfBb9y3Je/wA "JavaScript (Node.js) – Try It Online"