Ask for advice on how to write a js map method

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
}
Mar.01,2021

how to use map

  

`
let newArrayOne = oldArray.map ((item) = > {return item.name})
let newArrayTwo = oldArray.map ((item) = > {return item.num})
`

Menu