Finite-state machine example in JavaScript
Finite-state machine example in JavaScript 
Tags: javascript, patterns, example