Exact change pissed me off so bad

Exact change pissed me off so bad
0

#1

The way javacsript deals with numbers is crazy, and I think I completed the challenge in a bad way… I have also figured out that subtracting 0.01 x 3 times in a row makes your number go fonky like 0.999999 but if you use tofixed. it doesn’t.

Anyway here’s my code, feedback appreciated!


#2

numbers as floats sometimes behave very weirdly yes. I’m not looking forward to this one