Basic JavaScript - Returning Boolean Values from Functions

Tell us what’s haActually there is a very simple answer and everything is as it should be for the answer. But I can’t get past this question. I don’t know if it’s my answer or the system.ppening:
Describe your issue in detail here.

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 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Mobile Safari/537.36

Challenge: Basic JavaScript - Returning Boolean Values from Functions

Link to the challenge:

Why did you declare the function inside of the function?

Because without it there is no response. I have tried many times without “function”, the console test result is positive but it does not progress.

I’m not sure what you mean by ‘no response’ exactly?

There is no return value when you do put the function definition inside of a function definition.

Using the function keyword and the exact same function name inside of a function definition is a huge red flag.

Console and code screenshot attached. There is no progress.


You still have the same problem - you are now declaring isLess inside of isLess without using the function keyword.

Why did you type isLess? Its already there once. It doesn’t need to be there twice.

1 Like

There are no other clues. I’ve done a lot of research. I’ve worked for hours without a clue.

Here is a clue:

Did you try not typing isLess twice?

There isn’t anything asking you to type what you have on line 3. Delete it.

1 Like

:))
I just tried it. Life is full of surprises.
After your guidance I thought like this;
If there is no “function” and “ifElse”, there is no (a, b).
Thank you very much for your support.
Thank you very much.


Congrats!

Note - you should share your actual code, not a screenshot!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.