We're a place where coders share, stay up-to-date and grow their careers.
JS
largestProduct = (arr) => { const results = [] for (i=0; i<arr.length-1; i++){ results.push(arr[i] * arr[i+1]) } return Math.max(...results) }
JS