You are viewing a single comment's thread. Return to all comments →
In JS
function modifyArray(nums) { const res = nums.map((val) => { if (val % 2 == 0) { return val * 2; } else { return val * 3; } }); return res; }
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 →
In JS