Salesforce Certified Platform Developer II — Question 279

Users report that a button on a custom Lightning web component is not working. However, there are no other details provided.

What should the developer use to ensure error messages are properly displayed?

Answer options

Correct answer: D

Explanation

The correct answer is D because adding JavaScript and HTML allows the developer to create a user-friendly way to display error messages when the button does not function as expected. Options A, B, and C do not directly address the need for user feedback regarding errors in a way that informs users of the issues they encounter.