How can I pass a parameter to callback function which is inside map function

前端 未结 0 422
余生分开走
余生分开走 2021-01-06 23:38

I am a new learner of JS, there is a function like this

const generateNum = (array, key) => {
    return array.map(i => parseFloat(i.key));
}

相关标签:
回答
  • 消灭零回复
提交回复
热议问题