Programming Tips - Minimal web component

Date: 2020jul17 Updated: 2024mar23 Language: javaScript Q. Minimal web component A. There are dozens of counters: Its a useful example because it has to retain some state. Usage:
<script src='js/counter.js'></script> <my-counter></my-counter>
Oddly, they need to have a dash in the name. Self-closing syntax like <my-counter/> does NOT work. More discussion: