+ 1
JS Code Error!!!!!!
I have almost completed my most of the JavaScript Code of my Game , for testing I wanted to see that whether it's Running or Not , It's Running but not as I want. According to me it should so â "Computer choice: Rock paper or scissor" instead its showing â "Computer choice: botchoice" In the Console. And it's also showing something â "[ObjectHtmlImageElement]" in the Console , I don't know why it is doing so ????? I think that my Syntax is almost right but I can't find the error. Below is My code Please check and solve my error!!! , I'll really be very very thankful â https://code.sololearn.com/W55eRi8eRlnx/?ref=app
2 Answers
+ 1
So the first issue is just because you have quotes around "botchoice" referring to it as a string instead of a variable.
The second issue is cause because rpsgame(this) passing this refers to the img element. You then print it causing [objecthtmlimgelement] to be printed
0
JME thanks a lot......đđđđ