This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var game = { | |
userAmount: 100, | |
bet: null, | |
number: null, | |
guess: null, | |
getBetAmount: function() { | |
this.bet = parseInt(prompt("Please enter a bet:"),10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_support/all' | |
@candidates = [ | |
{ | |
id: 5, | |
years_of_experience: 4, | |
github_points: 293, | |
languages: ['C', 'Ruby', 'Python', 'Clojure'], | |
date_applied: 5.days.ago.to_date, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@states = { | |
OR: 'Oregon', | |
FL: 'Florida', | |
CA: 'California', | |
NY: 'New York', | |
MI: 'Michigan', | |
} | |
@states.merge! ({TX: "Texas"}) | |
@states.merge! ({KY: "Kentucky"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def shakil_the_dog | |
speaking = true | |
while (speaking) | |
puts "What do you want to say to the dog?" | |
say = gets.chomp | |
case say | |
when "woof" | |
puts "WOOF, WOOF, WOOF" | |
when "Shakil stop", "Shakil STOP!" |