How can I see the immediate result of execution of codes like this one?

You’ve done this challenge successfully pops up and I don’t get the whole outcome :confused:

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

abTest(2,2);

Change this line to console.log(abTest(2,2)) and it will print the result of the function in the console below.

2 Likes

Yup… As @nhcarrigan showed us. Console.log() is YOUR BEST FRIEND.

2 Likes

or press F12 (or something else?) to open your browser console, and run your code there

1 Like

@ieahleen, on most browsers it’s CTRL + SHIFT + I. At least for Windows 10.

1 Like

F12 does open the dev tools on Chrome. :slight_smile:

1 Like

thanks, @nhcarrigan && @Catalactics && @ieahleen :slight_smile: