Here is a link to my codepen. https://codepen.io/julius-88/pen/poRNRrN?editors=1010
let bill = 430;
const tip = bill * 0.15;
const tip2 = bill * 0.2;
const finalBill = bill + tip;
const finalBill2 = bill + tip2;
tip >= 50 <= 300 ? console.log(`The bill was ${bill}, the tip was ${tip}, and the total value is ${finalBill}`) : console.log(`The bill was ${bill}, the tip was ${tip2}, and the total value is ${finalBill2}`);
My problem is the return value. I have checked all of my const individually and they are all correct. But when the final result shows it shows the wrong number.
In the example in my codepen the tip is suppose to be 86 but it says that it is 64.5. I have no idea why it reduced the number and im going nuts trying to figure it out.
Does anyone know why?