We're a place where coders share, stay up-to-date and grow their careers.
JS
const adjacentProduct = arr => arr .slice(0, -1) .reduce( (max, n, i) => Math.max(max, n * arr[i + 1]), -Infinity )
JS