Https://www.codecademy.com/paths/web-development/tracks/getting-started-with-javascript/modules/code-challenge-javascript-fundamentals/lessons/javascript-fundamentals-code-challenge/exercises/tip-calculator

I did the following solution to the exercise below

https://www.codecademy.com/paths/web-development/tracks/getting-started-with-javascript/modules/code-challenge-javascript-fundamentals/lessons/javascript-fundamentals-code-challenge/exercises/tip-calculator

const tipCalculator=(quality,total) => {

  if (quality==='bad') {

      return total * 0.05

  } else if (quality==='ok') {

      return total * 0.15

  } else if(quality==='good') {

      return total * 0.20

  } else if(quality==='exellent') {

      return total * 0.30

  } else {

      return total * 0.18

  }

}

Gives the correct answers but still red cross. What I am doing wrong? Any help please ? Thanx

The error message you get is pretty informative? We could test the case of the error message:

console.log(tipCalculator('excellent', 100));

100 is an easy number to work with. 30% of 100 is 30. Yet i get 18. Seems something goes wrong in your condition.

Hi there,

I would check the spelling.

Good luck and happy coding