Lautaro Lobo Posted on Nov 30, 2019 • Originally published at lautarolobo.xyz on Nov 29, 2019 #7DaysJS: Factorial and Average #javascript #beginners #challenge Liquid syntax error: 'raw' tag was never closed Top comments (2) Subscribe Submit Preview Dismiss Collapse Expand Gustavo Flores Gustavo Flores Gustavo Flores Follow Software Developer, sometimes Frontend, sometimes Backend Location Chile Joined Jan 29, 2019 • Nov 30 '19 Dropdown menu Copy link Hide const fact = (n) => n == 1 || n == 0 ? 1 : n * fact(n - 1); const avg = (arr = []) => arr.length ? arr.reduce((a, b) => a + b) / arr.length : 0; Collapse Expand Jen Chan Jen Chan Jen Chan Follow Dev from hell, artist on strike Location Toronto, ON Education MFA in Art Video Syracuse University 2013 😂 Joined May 31, 2017 • Nov 30 '19 Dropdown menu Copy link Hide Today I relearned what a factorial is! Thanks! Code of Conduct • Report abuse
Top comments (2)
Today I relearned what a factorial is! Thanks!