Where I can write my game and see the result?


Replace this line with your code.


You can type it out in any text editor or even notepad save the file and run it in browser ..


is there any website can i write inside it and see the result


I would suggest repl.it



JS bin


thanks but I have more one Q what is the problem with my game
var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
} console.log("Computer: " + computerChoice);
var compare=function (choice1,choice2){
if(choice1 === choice2) {
return "The result is a tie";
else if(choice1 === "rock"){
if (choice2 === "scissors"){
return"rock wins";
return "paper wins";
else if (choice1 === "paper"){
if (choice2 === "rock"){
return "paper wins";
return "scissors wins";
else if(choice1 ==="scissors"){
if(choice2 === "rock"){
return "rock wins"; }
else {
return"scissors wins";


I write in repl.it and it is not running


Have a look at this it works :slight_smile:
Make sure to put it under the tab Javascript/JS


but I write my game inside it but it does not work


Here's it on repl.it


thank you soo much :slight_smile: