+ 1
My code isn't working
I have a code named Rock Paper Scissors if you go into my code you can probably see what I'm trying to do, but it's not working. Can anyone help?
8 odpowiedzi
+ 10
Here are some examples of how other people have done this. There are quite a few more examples available in code playground.
https://code.sololearn.com/WgPP67N1gOvV/?ref=app
https://code.sololearn.com/Wrwx0eGihcjk/?ref=app
https://code.sololearn.com/W5l9EalQRLh9/?ref=app
+ 9
https://code.sololearn.com/WbtcMJiUSLE4/?ref=app
Is this the code you refer to in your question?
+ 7
You're making conditions by using the "h" variable defined inside these functions:
function rock() { h=1 }
function paper() { h=2 }
function scissors() { h=3 }
... but you did not call these functions in your code.
[ Edit ]
Guys i think he is aware of the <script> tag, that's why he assigned a color to his HTML content...
The problem is the Js itself, it wouldn't work with or without that HTML. ^^
+ 2
Yes
+ 1
look at mine. take a break to read my code
https://code.sololearn.com/ckimKbYN3XS5/?ref=app
https://code.sololearn.com/WOLQwg89cAHW/?ref=app
0
there is no html..you repeat js code on html check it out..
0
use <script> tag or write those codes on js not html