Which method would you use to select all elements with specific data attributes and values?
// Select all elements where data-role='button' and data-state='active'
document.querySelectorAll('[data-role="button"][data-state="active"]') is the correct method to select all elements with specific data attributes and values. This CSS selector syntax allows you to chain multiple attribute selectors to find elements that match all specified conditions. The querySelectorAll() method accepts any valid CSS selector, making it extremely powerful for complex selection requirements that can't be easily achieved with older DOM methods.