← Problems
import { countWords } from "./counter";

const input = document.getElementById("input");
const output = document.getElementById("count");
input.addEventListener("input", () => {
  output.textContent = String(countWords(input.value));
});

PreviewOpen in new tab ↗Tests

Tests only run when you press ▶ Run tests (next to the Tests heading). Run them again after each change.

Open browser consoleTests

/index.jsJS