Hello. I have a simple question out of curiosity, it isn’t something complicated really and it may be dumb but I really want to know about it - and if there is an answer for this already (which I’m sure there is), I haven’t looked for it because I don’t exactly know how to ask about this.
I had just finished the Conditionals topic on the “Learning JavaScript” course, and on the review page I made a switch statement, just to practice it a bit more. I tried to incorporate more into the logs, from the first topic lessons for example. The point is, I was substracting 0.10 out of “apple”, defined as 0.80, which equals 0.70 - now, what I’m wondering is: why did the console print out “0.7000000000000001” as a result instead of the value mentioned above - 0.70? I was not expecting this and I’m a bit confused.