Updated js example