DEV Community

Discussion on: I Relearned JavaScript with Scrimba

Collapse
 
artydev profile image
artydev • Edited

I like(d) Imba.

But till then I found DML, look at the implementation of a tiny Counter here :

import {button, idiv} from "./dml"; 

function Counter () {
    let count = 0;
    let value = idiv("0", {style:"padding-right: 10px"});
    let binc = button("inc");
    let bdec = button("dec");
    binc.onclick = () => value.innerText = ++count;
    bdec.onclick = () => value.innerText = --count;
}

Counter()
Enter fullscreen mode Exit fullscreen mode

Directly in the browser, pure Javascript.
I wrote a post about it here : DevtoArticles

Regards