Jon, I suspect that your problem "went away" because you converted the input values from strings to numbers. For example, the value of numberOfNights in line 25 is a string, not a number. So the problem may have been that you were attempting to multiply a string by a float, rather than an integer by a float. Does that make sense?
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database