Moved example from coffeescript to javascript