**I’m new to ES6 javascript syntax ,I’m trying to get the odd numbers in the following array and then multiply by 2 using reduce method but it’s giving me “cannot read property ‘push’ of undefined” error. Any help please.
**
const multiplyOddByTwo = (arr) => {
return arr.reduce((acc,curr) => {
if(curr % 2 === 0){
acc.push(curr);
}else{
acc.push(curr * 2)
}
},[])
}
console.log(multiplyOddByTwo([1,2,3]));