Allow me to represent how my cat was acting last night as a finite state machine.
xxxxxxxxxx
<meta charset="utf-8">
<body>
<div id="cat"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="state-machine.js"></script>
<script src="finiteStateCat.js"></script>
https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js