Skip to content

Instantly share code, notes, and snippets.

View sburbidg's full-sized avatar

Scott Romney Burbidge sburbidg

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
var z = 22
var t = 0
matt = z / t
@sburbidg
sburbidg / guess objects
Created June 11, 2014 18:08
Guessing game after first objects lesson.
<script>
var collected = Math.floor(Math.random() * 1000)
function Range(low, high)
{
this.low = low
this.high = high
this.messageOutput = function(myGuess){return myGuess >= (collected + this.low) && myGuess <= (collected + this.high)
}
}
@sburbidg
sburbidg / guess objects
Created June 11, 2014 18:07
Guessing game after first objects lesson.
<script>
var collected = Math.floor(Math.random() * 1000)
function Range(low, high)
{
this.low = low
this.high = high
this.messageOutput = function(myGuess){return myGuess >= (collected + this.low) && myGuess <= (collected + this.high)
}
}
<script>
//var butterfly, sure, answer, done, collected, correct, guess
collected = Math.floor(Math.random() *1000)
var butterfly = function() {
alert("Oh no, a bunch of butterflies escaped!")
}
var answer = confirm("Would you like to open the box?")
var done = false