View Mode
Q: 2
Given the JavaScript below: 01 function filterDOM(searchString){ 02 const parsedSearchString = searchString && searchString.toLowerCase(); 03 document.querySelectorAll('.account').forEach(account => { 04 const accountName = account.innerHTML.toLowerCase(); 05 account.style.display = accountName.includes(parsedSearchString) ? /* Insert code here */ 06 }); 07 } Which code should replace the placeholder comment on line 05 to hide accounts that do not match the search string?
Options
Question 2 of 25

Premium Access Includes

  • ✓ Quiz Simulator
  • ✓ Exam Mode
  • ✓ Progress Tracking
  • ✓ Question Saving
  • ✓ Flash Cards
  • ✓ Drag & Drops
  • ✓ 3 Months Access
  • ✓ PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE