Return a Value from a Function with Return(output error?)

Tell us what’s happening:

whith this function i assume that the result should be 50and not 25??

I passed the test but i’m wondering

Your code so far

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

// Only change code below this line

function timesFive(numero) {
  return numero * 5;
}
var resposta = timesFive(10);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0.

Link to the challenge:
https://www.freecodecamp.org/challenges/return-a-value-from-a-function-with-return

Yes, it should. Is it outputting 25 somewhere?

(FYI, the testing suite passes a bunch of parameters beyond the one listed in the code you see in the editor).

yup at console that passes 25 everytime even if :

function timesFive(numero) {
return numero * 5;
}
var resposta = timesFive(0);

:face_with_monocle:

I suspect that you are being confused by this:
image

That box is only showing you the first test. See how it says timesfive(5)? That’s because it’s testing the output of the function when 5 is being passed as the argument, which should be 25. You can test the output of different values with console.log statements. I recommend using a tool like repl.it

For example:

2 Likes

ty mate :slight_smile: i aprecciate your help. i will save that link