Hi. Tried different approaches including using onclick attribute and using capture parameter on an event handler on ul. All work just fine in the browser but doesn't pass the test. Help please. Here's my code: ` <script> const buttons = document.querySelectorAll('.button'); const display = document.getElementById('entered-number');
for (var butt of buttons){ butt.addEventListener("click",(event)=>{ display.innerHTML+=event.target.innerHTML; }) } </script>
`
Kevo try adding an event listener to the .container and not the .button
.container
.button
const container = document.querySelector('.container');
Then, in the click handler use #entered-number to find out which number to use.
click
#entered-number
const input = document.querySelector('#entered-number')