题解 | #判断斐波那契数组#
判断斐波那契数组
https://www.nowcoder.com/practice/9df2a366eb25495caff41612bd0ffca6
const _isFibonacci = (array) => { let arr = []; for (let i = 0, len = Math.ceil(Array.length); i < len; i++) { array[i + 2] === array[i + 1] + array[i] ? arr.push("true") : arr.push("false"); } return arr.every((item) => item === "true"); };