You could make this a little more difficult by also accepting negative amounts (formatted correctly ;) and requiring the function to throw an error if the running total drops below zero.. it's fine for beginners though.
Loading collection data...
You could make this a little more difficult by also accepting negative amounts (formatted correctly ;) and requiring the function to throw an error if the running total drops below zero.. it's fine for beginners though.