Not able to understand - in java

Not able to understand

Basic JavaScript: Return Early Pattern for Functions
When a return statement is reached, the execution of the current function stops and control returns to the calling location.

Example

function myFun() {
console.log(“Hello”);
return “World”;
console.log(“byebye”)
}
myFun();
The above outputs “Hello” to the console, returns “World”, but “byebye” is never output, because the function exits at the return statement.

Modify the function abTest so that if a or b are less than 0 the function will immediately exit with a value of undefined.

Hint
Remember that undefined is a keyword, not a string.

What don’t you understand? Is this a challenge? Can you post the link? Or the actual code you don’t understand?

i am not able to understand, what code is trying to tell and how to complete the challenge?

Here is the link : https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions

Randall gives you a good explanation on how to solve the challenge, but you have to be more specific on what you don’t understand.

In a function when there is a return statement, and that function reaches the return statement it returns what lever you tell it to and quits. So for example

Function number() {
Var num=5;
Return num;

So for the above the function has a variable that gets set to 5, and then the function returns that number. So he function number now has a value of 5

If you tried to add anything after that the code would not be reached because of the return statement, because it would quit the function. Make sense? I’m just grasping at what you said you don’t understand