SOURCE

let a= 4

function asd(val=7){
    let half=val/2
    let newArr=Array.from({ length: a-2 }, (v, i) => 2+i)
    console.log(newArr)
     return  newArr.includes(half)

}

console.log(asd())
console 命令行工具 X clear

                    
>
console