question:
how can I write one of the two map methods in the following code to fulfill my code comment requirements?
without using ES6
oldArray:[
{
name:"i m name",
num:230
},
{
name:"i m name",
num:230
},
{
name:"i m name",
num:230
}
]
var newArrayOne = oldArray.map(function(){
//
// oldArray["name"]
})
var newArrayTwo = oldArray.map(function(){
//
// oldArray["num"]
})
function todo(newArrayOne,newArrayTwo){ //
//do something
}