This is a finite state machine written in javascript with five examples: a button, animation, draggable line, resizable div, and a splitable div