I have an array of numbers, that I want to map into a new array of numbers.
let numbers= [1,3,5,10,11]
needs to be turned into
var result = [4,8,15,21,11];
i tried using ES6 shorthand syntax, to do it. But there is not really any coherence between the numbers, so i though a callback would be better
let numbers= [1,3,5,10,11]
const result = numbers.map(x => resultBinding(x))
function resultBinding(x){
}
now my issue here is that I don't want to try to avoid making a lot of if-statements to determinate each value.