let arr =[
{title:'aaaa',read:100,hot:true},
{title:'bbbb',read:50,hot:false},
{title:'ccc',read:100,hot:true}
];
let newArr =arr.map((item,index,arr)=>{
let json ={};
json.t=`---${item.title}----------`;
json.r =item.read+200;
json.hot =item.hot ==true && '真棒';
return json;
})
console.log(newArr)
//map非常有用,做數據交互,'映射'
// 正常情況下,需要配合return,返回一個新的數組
//若是沒有return,相當於forEach
//平時只有用到map一定要有返回值

