`).join("") total.innerHTML = "Ksh. " + cartLS.total() } renderCart(cartLS.list()) cartLS.onChange(renderCart) window.setInterval(function(){ let qty = Object.keys(JSON.parse(localStorage.getItem('__cart'))).length; document.getElementById('cartThings').textContent = qty; // console.log('called') }, 1000); //const qty = Object.keys(JSON.parse(localStorage.getItem('__cart'))).length; //document.getElementById('cartThings').textContent = qty;