I am not getting it. need help please

Tell us what’s happening:

// Setup

var sum = 0;

function addThree() {

  sum = sum + 3;

}

// Only change code below this line

function addFive(){

  addfive =+ 5;

  addfive =+ 3;

  var result = addfive(); 

}

// Only change code above this line

addThree();

addFive();

Your code so far


// Setup
var sum = 0;

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

// Only change code below this line
function addFive(){
addfive =+ 5;
addfive =+ 3;
var result = addfive(); 
}

// Only change code above this line

addThree();
addFive();

Your browser information:

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

Challenge: Understanding Undefined Value returned from a Function

Link to the challenge:

Minor error: Flip the =+ to +=.

There’s another error besides that, but with some debugging, I believe you can get it.

1 Like

look at how addThree function is made, and think if it matches. You need to add five to the sum variable

1 Like

thanks
I have gotten the answer