Skip to content

Commit c710cdf

Browse files
authored
removing the JS code so that people must type it
1 parent 904b5b1 commit c710cdf

File tree

1 file changed

+2
-42
lines changed

1 file changed

+2
-42
lines changed

index.html

+2-42
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,14 @@
33
<head>
44
<link href="css/style.css" rel="stylesheet" type="text/css">
55
<script>
6-
var userName = prompt("What is your name, puny human?");
7-
8-
var userChoice = prompt("Do you choose rock, paper, or scissors?");
9-
10-
var computerChoice = Math.random();
11-
12-
if (computerChoice <= 0.33) {
13-
computerChoice = "rock";
14-
} else if (computerChoice <= 0.66) {
15-
computerChoice = "paper";
16-
} else {
17-
computerChoice = "scissors";
18-
}
19-
20-
var compare = function(userChoice, computerChoice) {
21-
if (userChoice === computerChoice) {
22-
window.alert("The result is a tie!");
23-
} else if(userChoice ==="rock") {
24-
if (computerChoice==="scissors") {
25-
26-
window.alert("Rock wins!");
27-
} else {
28-
window.alert("Paper wins");
29-
}
30-
}
31-
else if(userChoice==="paper") {
32-
if(computerChoice ==="rock") {
33-
window.alert("Paper wins!");
34-
} else {
35-
window.alert("scissors wins!");
36-
}
37-
}
38-
39-
else if(userChoice==="scissors") {
40-
if (computerChoice==="rock") {
41-
window.alert("Scissors wins!");
42-
} else {
43-
window.alert("scissors wins");
44-
}
45-
}
46-
};
6+
<!-- put your JavaScript code here for now -->
477
</script>
488
</head>
499
<body>
5010
<h1>Learn to Code JavaScript</h1>
5111
<h4>If you see a white button below, you're in good shape!</h4>
5212
<div class="wrapper">
53-
<button class="button" onclick="compare(userChoice, computerChoice);">LET'S PLAY Rock, Paper, Scissors!</button>
13+
<!-- put your JavaScript button here! -->
5414
</div>
5515
<div>
5616
<h3>Brought to you by your friends at <a href="http://galvanize.com">Galvanize</a>.</h3>

0 commit comments

Comments
 (0)