Tell us what’s happening:
I received this error message when I competed my code.
abTest(2,2) should return a number
abTest(2,2) should return 8
abTest(2,8) should return 18
abTest(3,3) should return 12
// tests completed
Your code so far
return undefined;
}
```js
// Setup
function abTest(a, b) {
// Only change code below this line
if (a < 0 || b < 0) {
return undefined;
}
// Only change code above this line
}
// Change values below to test your code
abTest(2,2);
Your browser information: Google Chrome
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions/