Error in "Undefined Value returned from a Function"?

Tell us what’s happening:

I’m passing the test with the below code just fine. However, I think the test condition "sum should be equal to 8" is incorrect.

Since the given code never execute addThree(), sum should be 5 at the end of the code, not 8.

Am I incorrect in thinking so?

Your code so far


// Example
var sum = 0;
function addThree() {
  sum = sum + 3;
}

// Only change code below this line

function addFive() {
  sum += 5;
}

console.log(sum);

// Only change code above this line
var returnedValue = addFive();

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function

@camperextraordinaire, That makes sense.

If that’s the case, I suggest reflecting that in the given code by adding addThree() above the returnedValue assignment line, below the comment noting the student to edit only the above.