我過不了函數*5,這關,請各位大大幫忙一下

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

var answer = timeFive(5);

var answer = timeFive(2);

var answer = timeFive(0);
但鍵入這些碼後,仍不能過關???

I found the lesson you are working on

Please always include this link so people can help you.

As for your challenge, you wrote this

But that is not the function name
Reread the directions again for the correct name

创建一个函数 timesFive 接收一个参数,把它乘以 5 之后返回。

Once you fix that then it will pass

1 Like

1.因去用中文社區的freecodecamp 的課程,所以我不知不會鍵到那課程上,因之前我用英文版的課程上HTML和CSS 現JAVASCRIP 改上中文版.
2.我的問題是:使用函數給return 返回值.不能過這關.
function timeFive(num){return num*5};

var answer = timeFive(5);

var answer = timeFive(2);

var answer = timeFive(0);
請各位大大幫忙!
hwapipi

You are not passing the test because you are using the incorrect function name.

You wrote this

But the lesson wants you to write this

Can you see the difference between the two?
You are missing a character in your answer.

Once you fix that then it will pass

Tell us what’s happening:
Describe your issue in detail here.

Your code so far


Your browser information:

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

Challenge: Return a Value from a Function with Return

Link to the challenge:

Dear Miss J:
Many Thanks! I had passed.

1 Like