Understanding Undefined Value returned from a Function
Summary
- If a
return
value doesn’t have a value, it isundefined
.
Final Code
// Setup
var sum = 0;
function addThree() {
sum = sum + 3;
}
// Only change code below this line
function addFive(num) {
sum+=5;
}
// Only change code above this line
addThree();
addFive();