You are viewing a single comment's thread. Return to all comments →
most simple solution i found
let pricies = [] for (const k of keyboards) { for (const d of drives) pricies.push(d + k) } const maxPrice = pricies.filter((p) => p <= b) return maxPrice.length > 0 ? Math.max(...maxPrice) : -1
Seems like cookies are disabled on this browser, please enable them to open this website
Electronics Shop
You are viewing a single comment's thread. Return to all comments →
most simple solution i found