Skip to content

Instantly share code, notes, and snippets.

@typeofweb
Created May 31, 2012 13:20
Show Gist options
  • Save typeofweb/2843386 to your computer and use it in GitHub Desktop.
Save typeofweb/2843386 to your computer and use it in GitHub Desktop.
Washing Machine Asynchronous Programming
(function(){
let WashingMachine = createWashingMachineFromElement(this);
WashingMachine.addEventListener("ready", function(){
WashingMachine.SetTemp(60, 'celcius', function(){
WashingMachine.SetMode(MODE_NORMAL, function(){
WashingMachine.Engage(function(){
WashingMachine.StartWashing();
});
});
});
}, false);
}().bind(bathroom.querySelector('#washingMachine'));
@pipobscure
Copy link

Error: washing machine not found
at bathroom:1:25

I think thi sis buggy code since the washing machine lives in the kitchen

@typeofweb
Copy link
Author

Washing machine in the kitchen? o.O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment