You are viewing a single comment's thread. Return to all comments →
function modifyArray(nums) { let newnums=[]; for(let i=0; i<nums.length; i++){ if(nums[i]%2 ===0){ newnums.push(nums[i]*2); } else{ newnums.push(nums[i]*3); } }; return newnums;
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Arrow Functions
You are viewing a single comment's thread. Return to all comments →