Updated js version and added example