
There is a flaw in the program. But that is on purpose. The book created a flaw so you can learn to see errors. This error is that there is a concatentation done by the computer, treating the numbers as strings and adding them instead of adding the tip to the meal price as a calculation.
The next exercise corrects this error. As we learn how to assess types of variables in Javascript.