Javascript – Add a dollar sign with an Event Listener
I am very new to this - how can I add a dollar sign using an event listener? Currently I have: let dol = document.querySelector('#dollar'); dol.addEventListener('keyup', function(e) { { dol.value = "$" + dol.value; } }); But this is adding…