String not exact?

Why can’t I go to the next exercise? I get this error: “If the planet passed as an argument is anything other than the Mercury, Venus, Mars, Jupiter or Saturn, your function should return: ‘Invalid Planet Entry. Try: Mercury, Venus, Mars, Jupiter, or Saturn.’ : expected ‘Invalid Planet Entry. Try: Mercury, Venus, Mars, Jupiter or Saturn.’ to equal ‘Invalid Planet Entry. Try”

This is my code:

// Write your function here:
const calculateWeight = (earthWeight, planet) => {
  switch (planet) {
    case 'Mercury':
    	return earthWeight * .378;
    case 'Venus':
   	  return earthWeight * .907;
    case 'Mars':
    	return earthWeight * .377;
    case 'Jupiter':
    	return earthWeight * 2.36;
    case 'Saturn':
    	return earthWeight * .916;
    default:
    	return 'Invalid Planet Entry. Try: Mercury, Venus, Mars, Jupiter or Saturn.';
  }; //closes planet switch
}; // closes calculateWeight
  
console.log(calculateWeight(82, 'Mars'));

// Uncomment the line below when you're ready to try out your function
// console.log(calculateWeight(100, 'Jupiter')) // Should print 236

// We encourage you to add more function calls of your own to test your code!
1 Like