Tell us what’s happening:
I have a problem because i think i correctly answered the 1st challenge, though the test isnt over and my test says :`
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
`
Im totally confused and dont know how to set the function so that it pass this.
Your code so far
// Setup
function abTest(a, b) {
// Only change code below this line
if (a || 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);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0.
Link to the challenge: