JSFiddle - React, Tailwind, and code Playground
by jahongirsobirov
HTML
<script src="https://signel.onrender.com/signel.js"></script>
<ul id="num-list"></ul>
<button id="push">Push number</button>
<button id="pop"> Pop number</button>
<button id="reverse">Reverse list</button>
JavaScript
let nums = list([1, 2, 3]);
renderList("#num-list", nums, num => `<li>${num}</li>`);
click("#push", ()=> nums.push(nums.length + 1));
click("#pop", ()=> nums.pop());
click("#reverse", ()=> nums.reverse());