Skip to content

Instantly share code, notes, and snippets.

View traviswimer's full-sized avatar
💻
Coding and/or kayaking probably

Travis Wimer traviswimer

💻
Coding and/or kayaking probably
View GitHub Profile
@traviswimer
traviswimer / robot.js
Created December 3, 2012 17:24
Lil Red Biotch
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.foundFirstWall=false;
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
@traviswimer
traviswimer / PurposeOfFinally.js
Created April 24, 2013 05:31
The purpose of finally (as in try{ }finally{ })
///////////////////////////////
// Why does `finally` exist? //
///////////////////////////////
try{
console.log("first");
return;
//this wont get called because of the return
console.log("second");
}finally{