const threshold = 5000; const subtotals = [4999, 5000, 5001]; const results = subtotals.map((subtotal) => subtotal >= threshold ? "free" : "paid" ); console.log(results.join(", "));