View all questions & answers for the JavaScript-Developer-I exam
Referto the following code:
<html lang=”en”>
<body>
</body>
<script>
function displayMessage(ev) {
ev.stopPropagation();
console.log(‘Inner message.’);
}
const elem =document.getElementById(‘myButton’);
elem.addEventListener(‘click’ , displayMessage);
</script>
</html>
What will the console show when the button is clicked?
Submit