Add exit message to JavaScript example