You are viewing a single comment's thread. Return to all comments →
let applesOnRange = apples.map(apple=>apple+a) .filter(apple=>apple>=s&&apple<=t).length let orangesOnRange = oranges.map(orange=>orange+b) .filter(orange=>orange>=s&&orange<=t).length console.log(applesOnRange + "\n" + orangesOnRange)
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →