ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 11 - Certified JavaScript Developer I discussion

Report
Export

Given the JavaScript below:

01 function filterDOM (searchString) {

02 const parsedSearchString = searchString && searchString.toLowerCase() ; 03 document.quesrySelectorAll(' .account' ) . forEach(account => ( 04 const accountName = account.innerHTML.toLOwerCase(); 05 account. Style.display =

accountName.includes(parsedSearchString) ? /*Insert code*/; 06 )}; 07 } Which code should replace the placeholder comment on line 05 to hide accounts that do not match the search string?

A.
' name ' : ' block '
Answers
A.
' name ' : ' block '
B.
' Block ' : ' none '
Answers
B.
' Block ' : ' none '
C.
' visible ' : ' hidden '
Answers
C.
' visible ' : ' hidden '
D.
' hidden ' : ' visible '
Answers
D.
' hidden ' : ' visible '
Suggested answer: B
asked 23/09/2024
Peter Lilley
49 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first