<!DOCTYPE html>
<html>
<head>
	<link rel='stylesheet' href='style.css'/>
</head>
<body>
<p>Testing values using code from http://www.codecademy.com/forum_questions/521d2027f10c6051bb001e07#response-54f4c6fb95e378c0bd00045d</p>
	<script src='script.js'></script>
</body>
</html>

// var computerChoice = Math.random();

// try various numbers here to see what your result is
var computerChoice = 0.4;

document.write(computerChoice);

if ( computerChoice <= 0.33) {
    computerChoice = "rock";
} else if (0.34 <= computerChoice <= 0.66) { 
    computerChoice = "paper";
} else if (0.67 <= computerChoice <= 1) {
    computerChoice = "scissors";
}
    
document.write(" gives us ", computerChoice, "<br>")
Created from scratch
3 forks
77 views

Browse more Codebits