Basic JavaScript - Return a Value from a Function with Return

The code is like this:

let sum = 0;

function addThree()  {
  sum = sum + 3
function addFive() {
  sum = sum + 5

//Only change the code below this line

//Only change the code above this line


Please don’t delete information from the auto generated posts about the challenge.

Is this the link

Can you explain in words what you are confused about?

By the way, the link is like this:

  • addSum is a function without a return statement. The function will change the global sum variable but the returned value of the function is undefined .

Yes :+1: :+1: :+1: :+1: :+1:

Do you have a question about this challenge?

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.