DEV Community

Discussion on: What’s your alternative solution? Challenge #51

Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

    const maxInArray = v => Array.isArray(v) ? 
         v.reduce(
             (a,c)=>Math.max(a, maxInArray(c))
         ) : v