I am a new learner of JS, there is a function like this
const generateNum = (array, key) => { return array.map(i => parseFloat(i.key)); }