Cant pass this...please help

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

// Setup
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));}

  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14119.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4588.0 Safari/537.36

Challenge: Return Early Pattern for Functions

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

Adding this semicolon is causing problems.


once i add the return undefined; the line for return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2)); gives a error 7072

What is your current code? Do you still have this extra semicolon that I told you to remove?

thank u. removing the ; worked :smile:

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