I need help with these functions in JS

I am trying to finish an Assignment in a course from THE ODIN PROJECT the link for the Assignment is :
https://www.theodinproject.com/lessons/rock-paper-scissors

I created some Functions in order to make up the game the problem is till the last moment everything runs fine but then it give me an ERROR back saying that one variable is not defined !!!

I tried to solve it but i could not so please i would appreciate any solution or suggestion .

The link to the script i wrote on Codepen is :

codepen.io/Dani-997/pen/MWavxzX?editors=0112

thank you :slight_smile:

You must define comScore in game function.

do you think it may help ?? because i have defined it before with var and also there are values assigned to it !!!

1 You have to deal with the content entered by the user, which may be empty.

2 There may be a better way to define variables, you can refer to MDN. There are also variable scopes.

3 I think English is harder than this.

The above content uses Google Translate (including this)

1 Like

You can refer to my demo(ignore the Chinese)
https://codepen.io/lninn/full/RwWZmBE

Hope it can help you!

1 Like

Thank you so much … it helps :slight_smile: