ANTON KADACH

Generation

code to explanationWed, 18 Jan 2023

parcels.map((parcel) => { const [warehouse] = cacheContainer.warehousesByMerchantId.get(Number(parcel.merchantId)) || []; const pickupRegion = cacheContainer.pickupRegionsByGeoId.get(warehouse.geoId); return getPickupFromParcel({ warehouse, pickupRegion }); }

The function getPickupFromParcel takes two arguments warehouse and pickupRegion and returns a value.

Questions about programming?Chat with your personal AI assistant