You are viewing a single comment's thread. Return to all comments →
JavaScript
function jimOrders(orders) { const sumTimes = orders.map((e) => e[0] + e[1]) const clients = sumTimes.map((e,i) => ({[i + 1] : e })) clients.sort((a,b) => Object.values(a)[0] - Object.values(b)[0]) return clients.map((e) => Object.keys(e)[0]) }
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Orders
You are viewing a single comment's thread. Return to all comments →
JavaScript