Hi! I’m doing this exercise but I do not get it
// Setup
var sum = 0;
function addThree() {
sum = sum + 3;
}
// Only change code below this line
function addFive() {
sum += 5;
}
// Only change code above this line
var returnedValue = addFive();
addThree();
addFive();
when I run the test it says: " // running tests Once both functions have ran, the
sum
should be equal to 8. // tests completed"
// Setup
var sum = 0;
function addThree() {
sum = sum + 3;
}
// Only change code below this line
function addFive() {
sum += 5;
}
// Only change code above this line
var returnedValue = addFive();
addThree();
addFive();
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36
.
Challenge: Understanding Undefined Value returned from a Function
Link to the challenge: