What's the problem with my code?

You’re missing a closing curly bracket at the end of the function calculateWeight.

1 Like

umm but i dont need to curly bracket here !!

You need as many closing brackets as opening ones - otherwise you get a syntax error. That is the case here.
You have

const calculateWeight = (earthWeight, planet) => { // <-- no closing counterpart

yepp thank you dear so much

1 Like