Skip to main content
100%

Character & Word Count - Announcing the Count

✓ Published0🌍 Public
Aangusgrant
Last edited Oct 21, 2022
Created on Oct 21, 2022

This interactive text editor displays live character and word counts as a user types. It shows the running totals in a sentence below the textarea, updating with each input event. The code uses the DOM API’s `querySelector` and `addEventListener` to bind an input listener, splitting the text on whitespace via a regular expression to count words, while character count is derived from the string’s `length` property. The page also includes ARIA live regions for screen-reader accessibility.

AI-generated description

Similar vizzes