JS problem can't get past

Tell us what’s happening:
Hello first time poster. Really struggling to get past this one. I have no idea where I made the mistake. Any help would be appreciated

Your code so far


function isLess(a, b) {
// Only change code below this line
function isLess(a, b) {
return a < b;
}
// Only change code above this line
}

isLess(10, 15);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0.

Challenge: Returning Boolean Values from Functions

Link to the challenge:

you already have the function definition

the starting code is

function isLess(a, b) {
  // Only change code below this line
  if (a < b) {
    return true;
  } else {
    return false;
  }
  // Only change code above this line
}

see that you have already the

function isLess(a, b) {...}

you don’t need to write it again, so remove the inner function definition

Thank you that worked. Seems obvious now just new to Javascript.

awesome! happy coding

1 Like