Returning Boolean Values from Functions I can't pass the test

Tell us what’s happening:
Something is wrong with my code. can’t figure out what.

i changed the true false to the === but it doesn’t seem to work why?

Your code so far


function isLess(a, b) {
  // Fix this code
  return a === b;
  } 

// Change these values to test
isLess(10, 15);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions

You’re not testing for equality here; you’re trying to see whether a is less than b. Simply change the strict equality to the less than sign and your problem should be solved.

function isLess(a, b) {
  return a < b;
} 
1 Like