Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 27 Topic 3 Discussion

Salesforce Certified JavaScript Developer (JS-Dev-101) JavaScript-Developer-I Question # 27 Topic 3 Discussion

JavaScript-Developer-I Exam Topic 3 Question 27 Discussion:
Question #: 27
Topic #: 3

Given the following code:

document.body.addEventListener(‘ click ’, (event) => {

if (/* CODE REPLACEMENT HERE */) {

console.log(‘button clicked!’);

)

});

Which replacement for the conditional statement on line 02 allows a developer to

correctly determine that a button on page is clicked?


A.

Event.clicked


B.

e.nodeTarget ==this


C.

event.target.nodeName == ‘BUTTON’


D.

button.addEventListener(‘click’)


Get Premium JavaScript-Developer-I Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.