DEV Community

loading...

Discussion on: Daily Challenge #306 - Largest Possible Product

Collapse
bugb profile image
bugb

JS

const adjacentProduct=a=>Math.max(...a.map((m,i)=>m*(a.slice(1)[i]>>0)))
Enter fullscreen mode Exit fullscreen mode