Question 9
Consider the following HTML and JavaScript code.
HTML file
<button id="btn">Click Me</button>
<script> const btn = document.getElementById('btn'); btn.addEventListener('click', () => console.log('A')); btn.onclick = () => console.log('B'); btn.addEventListener('click', () => console.log('C')); btn.click();</script>Among the following console log statements, which ones will be logged when the code executes?
(Select all that apply, irrespective of the order.)
A
B
C
None