Salesforce JAVASCRIPT-DEVELOPER-I Exam (page: 3)
Salesforce Certified JavaScript Developer I
Updated on: 25-Dec-2025

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 thesearch 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): A



A developer is creating a simple webpage with a button.
When a userclicks 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 functionlisten(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, useevent.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. Theimported 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



Viewing Page 3 of 46



Share your comments for Salesforce JAVASCRIPT-DEVELOPER-I exam with other users:

Gopinadh 8/9/2023 4:05:00 AM

question number 2 is indicating you are giving proper questions. observe and change properly.
Anonymous