SOLVED: Can't pass "Return Early Pattern for Functions"

SOLVED: Can't pass "Return Early Pattern for Functions"
0.0 0

#1

I can’t seem to pass this lesson, when I test it I get the right response but it doesn’t pass.

Please help,

TIA

function abTest(a, b) {
  // Only change code below this line
  if (a <0 || b <0){
    return "undefined";
  }
  
  
  // 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
abTest(2,-2);

#2

Ah lol I haven’t even looked at the problem yet, but try taking the quotes off undefined


#3

That was it! Thanks for you help.


#4

Hint: If you don’t put anything after return it returns undefined by default.