LWC Intermediate Quiz – 15 Questions on Lightning Data Service, Events, LMS & More

LWC Intermediate Quiz

15 intermediate-level questions covering Lightning Data Service, wire adapters, Lightning Message Service, slots, events, security (LWS), and testing. Click an option to instantly see if you got it right.

Score: 0 / 15
Question 1 of 15
Which method do you call to imperatively refresh data previously retrieved via @wire when it might be stale?
Question 2 of 15
Which module provides Lightning Data Service wire adapters like getRecord and getFieldValue?
Question 3 of 15
Which template directive is used for conditional rendering in the newer LWC syntax (replacing if:true)?
Question 4 of 15
When iterating over a list with for:each in a template, what attribute must each rendered item have?
Question 5 of 15
Which service lets you pass data between components that are not in the same DOM hierarchy, such as across separate tabs?
Question 6 of 15
Which CSS pseudo-class do you use in an LWC stylesheet to style the component’s own host element?
Question 7 of 15
Which two properties must be set to true on a CustomEvent for it to cross shadow DOM boundaries and bubble up through the component hierarchy?
Question 8 of 15
Which template feature lets a parent component inject markup into a specific placeholder inside a child component’s template?
Question 9 of 15
Which event do you dispatch to show a toast notification in LWC?
Question 10 of 15
Which attribute on an Apex method makes its results cacheable by the Lightning Data Service / wire service on the client?
Question 11 of 15
Which base component lets users create or edit a record with minimal code while automatically respecting field-level security?
Question 12 of 15
Which security architecture enforces strict DOM isolation in LWC and restricts direct access to global objects like window?
Question 13 of 15
Which JavaScript testing framework does Salesforce recommend for unit testing LWC components?
Question 14 of 15
How do you call an Apex method imperatively (instead of via @wire) from an LWC JS controller?
Question 15 of 15
Which template directive gives you a direct reference to a DOM element in an LWC template, replacing many uses of this.template.querySelector?

Leave a Reply