Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam JavaScript-Developer-I All Questions
Exam JavaScript-Developer-I All Questions

View all questions & answers for the JavaScript-Developer-I exam

Salesforce Developer JavaScript-Developer-I Question # 15 Topic 2 Discussion

JavaScript-Developer-I Exam Topic 2 Question 15 Discussion:
Question #: 15
Topic #: 2

Given the JavaScript below:

01 function filterDOM (searchString) {

02 constparsedSearchString = 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 thesearch string?


A.

‘ name ’ : ‘ block ’


B.

‘ Block ’ : ‘ none ’


C.

‘ visible ’ : ‘ hidden ’


D.

‘ hidden ’ : ‘ visible ’


Get Premium JavaScript-Developer-I Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.