|
|
|
|
|
by genezeta
565 days ago
|
|
It's not my intention to discard the whole article for this problem but... calculateTotalPrice(100, [5, 10, 15]);
And so, a base price of 100 and applying discounts of 5, 10, and 15, produces a total price of... 3000. Odd kind of discount, innit?I mean, either this is a bad example not well thought out, or the original function is doing something completely different and the supposedly good naming is actually a very bad one since it appears to make sense but doesn't. In either case not good. |
|