Skip to content

Instantly share code, notes, and snippets.

Created October 1, 2010 17:11
Show Gist options
  • Save anonymous/606510 to your computer and use it in GitHub Desktop.
Save anonymous/606510 to your computer and use it in GitHub Desktop.
var a = {
state: false, // we don't really use this, see below;
set_state: function(s){ if(s) go = right else go = left },
go: left, // default is state == false
left: function(){ console.log('i go left') },
right: function(){ console.log('i go right') }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment