Basic JavaScript - Return a Value from a Function with Return

I do not understand what is happening. The lesson let me pass simply by naming the function and returning the value of my parameter so that it multiplies by 5 though it asks me to then use it to get 5 to multiply by 5, 2, and 0 but it simply justs accepts the code below as having solved the lesson even though i technically did not input for the computer to calculate anything. Could someone explain what im missing? I dont feel confident about this stage.

Your code so far

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

Your browser information:

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

Challenge Information:

Basic JavaScript - Return a Value from a Function with Return

Create a function timesFive that accepts one argument, multiplies it by 5, and returns the new value.

Your code meets this requirement. The tests verify that your code works by using 2, 5, and 0 as arguments and calling your function.

2 Likes

is the criteria at the bottom of the page not always supposed to be translated onto the work everytime?

oh, i did not need to actually do it myself this time. understood. Thank you!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.