Replace Inline JavaScript Events with addEventListener
Description
Inline event handlers in HTML reduce maintainability. Using addEventListener is more flexible and cleaner.
Original Code (Outdated)
<button onclick="sayHello()">Click Me</button>
Updated Code (Modern)
<button id="btn">Click Me</button>
<script>
document.getElementById("btn").addEventListener("click", sayHello);
</script>