Undefined value challenge problem

Tell us what’s happening:
It says that the sum should equal 8 but I’m not so sure what I should do.

  **Your code so far**

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

function addFive() {
sum += 5;
  **Your browser information:**

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

Challenge: Understanding Undefined Value returned from a Function

Link to the challenge:

Is the code you show all the code? Did you remove the two lines at the end, perhaps? Your code passes for me when I paste in the addFive function.

1 Like

I tried again, I had to call the functions

1 Like

Thanks for your concern though, the problem is solved now

1 Like

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