let arr = ['随风','随雨','随缘']; obj = {}; for(var key in arr){ obj[key] = arr[key] } console.log(obj)
页面效果: