📅  最后修改于: 2022-03-11 15:03:20.888000             🧑  作者: Mango
function adjacentElementsProduct(items) {
var product = 0;
for (var i = 0; i < items.length - 1; i++) {
product = Math.max(product, items[i] * items[i + 1]);
}
return product;
}
console.log(adjacentElementsProduct([3, 6, -2, -5, 7, 3]));