1:对象转换数组 let obj = {'val1':1, 'val2':2, 'val3':3, 'val4':4}; var arr = [] for (let i in obj) { //取键 let o = {}; o[i] = obj[i]; //寻找键值对赋值 arr.push(o) } console.log(arr); //[ { val1: 1 }, { val2: 2 }, { val3: 3 }, { val4: 4 } ] 2:数组转字符串 let a = [123,43…