Trying to understand something in JavaScript

Hello everyone,

function timesFive(num) {
  return num * 5;
}
var answer = timesFive(5);

For what is that variable answer = ?
I can’t just only call the fuction with timesFive(5); like that?
It’s just for store the value in answer = and then you jsut can use it for something else?

Thank you

Yes, by assigning the result of the function to answer, answer can be used somewhere else.

1 Like

Thank you for the answer! :hugs: