Basic JavaScript - Understanding Undefined Value returned from a Function

says sum has to equal 8 for both functions, what am i doing wrong here

// Setup
let sum = 0;


function addThree() {
   sum = sum + 3;
}

 function addFive() {
   sum += 5;
 }


Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14989.107.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Understanding Undefined Value returned from a Function

Link to the challenge:

Try to restart this exercise and then before you code, read the comments in the code section. They are telling you to write your code in a specific area without touching any of the existing code.

1 Like

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