+ 1

Could you help me, please?

Hello, sorry if I sound kinda dumb but, the code I have linked below is a RPS game , I have been trying to make it so that the answer is saved somewhere so I can print "You lost!" But I don't know what I need to add. Secondly, I want "<input type="reset" value="reset"><br />" To stay but it gets removed whenever I click "Click me for a game of RPS". Thanks for reading. https://code.sololearn.com/W0dTbSrUQUTg/?ref=app

15th May 2020, 8:48 PM
SpaghettDev
SpaghettDev - avatar
2 Respostas
+ 2
Create a container (e.g. div) and give it an id. Then replace document.write with this: document.getElementById("yourChosenId").innerText = 'computer chose: ' + word;
15th May 2020, 8:58 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar
+ 1
Manu_1-9-8-5 Thanks!
15th May 2020, 8:59 PM
SpaghettDev
SpaghettDev - avatar