Text-editor won't take in my solution

Hi everyone. I am working on the following exercise:


My solution is:

const numImaginaryFriends = param1 => Math.round(param1 * 0.333);

For some reason, it wouldn’t work although the solution suggested in Hints is similar with mine. It keeps giving me an error that I should round my result. I have tried a few console logs, everything looks ok to me.

Any idea what’s wrong?
Many thanks.

I’m not sure what the problem is…

I did the following:

const numImaginaryFriends = totalFriends => Math.round(totalFriends * 0.33);

and it passed the exercise.

All I can suggest, if it absolutely won’t take the solution, is to reset the exercise and type it in again. It could be that the learning environment has had an off moment. :slight_smile:

Hello and thank you for your reply.

I have restarted and all that but in the end, I just asked it for the solution, copied, pasted it and it worked. The only difference between its solution and mine was the name of the parameter. You’re right, probably it just had a bad day and decided to just not care anymore.

…or it might have been expecting a specific parameter name? I’d have expected it to be given, if it were…

I’ll ask whether it’s validating with a specific parameter name and get back to you. :slight_smile:

I think it was that you multiplied the parameter by 0.333, instead of 0.33