<button>Show</button>
<output></output>

import { fromEvent } from "https://cdn.skypack.dev/rxjs@7.3.0";

const output = document.querySelector("output");
const button = document.querySelector("button");

fromEvent(button, "click").subscribe(() => {
  output.textContent = Math.random().toString(36).slice(2);
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.