Salesforce CRT-600 Exam
Prepare for your JavaScript Developer I Certification Exam (Page 4 )

Updated On: 12-Feb-2026

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?

  1. ` name ' : ` block '
  2. ` Block ' : ` none '
  3. ` visible ' : ` hidden '
  4. ` hidden ' : ` visible '

Answer(s): B



developer publishes a new version of a package with new features that do not break backward compatibility. The previous version number was 1.1.3. Following semantic versioning format, what should the new package version number be?

  1. 2.0.0
  2. 1.2.3
  3. 1.1.4
  4. 1.2.0

Answer(s): D



A developer is creating a simple webpage with a button.
When a user clicks this button for the first time, a message is displayed.
The developer wrote the JavaScript code below, but something is missing. The message gets displayed every time a user clicks the button, instead of just the first time.
01 function listen(event) {
02 alert ( `Hey! I am John Doe') ;
03 button.addEventListener (`click', listen);

Which two code lines make this code work as required?
Choose 2 answers

  1. On line 02, use event.first to test if it is the first execution.
  2. On line 04, use event.stopPropagation ( ),
  3. On line 04, use button.removeEventListener(` click" , listen);
  4. On line 06, add an option called once to button.addEventListener().

Answer(s): C,D



A developer uses a parsed JSON string to work with user information as in the block below:
01 const userInformation ={
02 " id " : "user-01",
03 "email" : "user01@universalcontainers.demo",
04 "age" : 25

Which two options access the email attribute in the object? Choose 2 answers

  1. userInformation("email")
  2. userInformation.get("email")
  3. userInformation.email
  4. userInformation(email)

Answer(s): A,C



Refer to the code below:
01 const server = require(`server');
02 /* Insert code here */
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the servers
Which code should be inserted at the line 03 to set up an event and start the web server ?

  1. Server.start ();
  2. server.on(` connect ' , ( port) => {
    console.log(`Listening on ' , port) ;})
  3. server()
  4. serve(( port) => (
  5. console.log( `Listening on ', port) ;

Answer(s): B






Post your Comments and Discuss Salesforce CRT-600 exam prep with other Community members:

Join the CRT-600 Discussion