SOURCE

const keys = ['zhangsan','lisi','wangwu']
const nums = [18,36,56]

const obj = keys.reduce((obj,item,index)=>{
    console.log(JSON.stringify(obj),item,index)
    obj[item] = item
    return obj
},{})

console.log(JSON.stringify(obj))
console 命令行工具 X clear

                    
>
console