Notifications
Clear all

Which replacement for the conditional statement on line 02 allows a developer to correctly determine that a button on page is clicked?

1 Posts
1 Users
0 Likes
135 Views
(@cainsmarshall)
Posts: 692
Noble Member
Topic starter
 

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’)

Show Answer Hide Answer

Suggested Answer: C
 
Posted : 29/01/2023 5:42 pm

Latest Salesforce JavaScript Developer I Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: