Return Early Pattern for Functions help needed

Tell us what’s happening:
Cant figure out how to do this challenge, makes no sense. Looked up similar threads to the same question, tried those, still no luck.

Your code so far

// Setup
function abTest(a, b) {
  // Only change code below this line
  // Only change code above this line

  return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));

// Change values below to test your code

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36.

Link to the challenge:

Do you know how to test for a or b being less than zero ? start with that first

I tried saying if (a < 0 || b < 0) {
Didn’t work

Ok your if condition is fine, but the challenge says

the function will immediately exit with a value of undefined

right now you are returning nothing and just exiting out of the function.

So do I say return undefined?

yes, undefined is a primitive JavaScript type.