# Return a Value from a Function with Return

## Problem Explanation

Using `return`, you can make functions output data.

## Solutions

Solution 1 (Click to Show/Hide)
``````function timesFive(num) {
return num * 5;
}
``````
5 Likes

Solution to this challenge is:

// Example
function minusSeven(num) {
return num - 7;
}

// Only change code below this line
function timesFive(num) {
return num * 5;

}

4 Likes

Hi everyone. I think this challenge has a bug:

As you can see I set to the parameter â€śmultâ€ť, the argument of 3, but the result that freeCodeCamp is showing on the down-left side for timesFive function is 25. So itâ€™s assigning a preset value of 5 istead of 3 as I wrote it.

Does anybody else met this issue before?

Iâ€™m new here and I donâ€™t know where to post this bug, so I followed their steps and end it up here.
Sorry if I misunderstood something. Thanks

5 Likes

This was a very simple and easy challenge for me. Here is the solution of it.

``````// Example
function minusSeven(num) {
return num - 7;
}

// Only change code below this line

function timesFive(num) {
return num * 5;
}

1 Like

Yes, I also did this after I red your post, and unfortunately the result was same. I think it may be a bug. I agree with you.

this is definitely bugged

expected: 50,

shows 25

1 Like

it does this in most of the solutions that can have multiple inputs. So, my guess is, the webpage itself is not running a compiler where you can test results. I reckon you must use compiler to see actual results.

my variant:

// Example
function minusSeven(num) {
return num - 7;
}

// Only change code below this line

function timesFive (multiFive) {
multiFive *= 5;
return multiFive;
}

Some of these posts are 4 months old, and this problem still has the same bug. I tried to solve this two different ways, but no matter what I do, I get the answer of 25, even when the solution is incomplete:

function timesFive(num)
{
return num * 5;
}
** Gives me a correct result with answer of 25 (but no argument being passed into the function!)

function timesFive(num)
{
return num * 5;
}

** Also gives me a correct result the the (incorrect) answer of 25!! (Pretty sure this is the correct solution, with an answer of 10)

Hello campers,this is how i did it:

// Example
function minusSeven(num) {
return num - 7;
}

// Only change code below this line

function timesFive(num) {
return num * 5;
}