Get Jun-2026 updated JavaScript-Developer-I Certification Exam Sample Questions [Q134-Q159]

Share

Get Jun-2026 updated JavaScript-Developer-I Certification Exam Sample Questions

JavaScript-Developer-I Study Guide Cover to Cover as Literally


How to Prepare for Salesforce JavaScript Developer I Exam

Preparation Guide for Salesforce JavaScript Developer I Exam

Introduction

Salesforce is a solution for managing customer relationships that unite customers and companies. This is an interactive CRM platform that provides a single, shared view of every client in all the divisions including marketing, distribution, exchange, and operation. Provide the clients with the individual experience Salesforce demand 360 product via the Integrated CRM Platform. It delivers solid and related goods to boost marketing, revenue, exchange, operation, IT, and more. Salesforce is a digital cloud computing (SaaS) firm specializing in the management of client relationships (CRMs). There was a mistake. The app is now the number one of consumer satisfaction and allows organizations to track customer behavior, advertise to consumers, and more. Salesforce is common because it is bundled with features such as contact management, workflow development, task management, incentive monitoring, teamwork tools, customer experience tools, analytics, and interactive, smartphone dashboard.


Upon passing the Salesforce JavaScript-Developer-I Exam, candidates will be awarded the Salesforce Certified JavaScript Developer I certification. Salesforce Certified JavaScript Developer I Exam certification is a valuable asset for any developer who wants to showcase their expertise in Salesforce development and increase their chances of finding job opportunities in the field.

 

NEW QUESTION # 134
developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality.
The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up.
Given the code and the information thedeveloper has, which code logs an error at boost with an event?

  • A. Server.catch ((server) => {console.log('ERROR', error);});
  • B. Try{server.start();} catch(error) {console.log('ERROR', error);}
  • C. Server.error ((server) => {console.log('ERROR', error);});
  • D. Server.on ('error', (error) => {console.log('ERROR', error);});

Answer: D


NEW QUESTION # 135
A developer at Universal Containers creates a new landing page based on HTML, CSS, and
JavaScript TO ensure that visitors have a good experience, a script named personaliseContext
needs to be executed when the webpage is fully loaded (HTML content and all related files ), in
order to do some custom initialization.
Which statement should be used to call personalizeWebsiteContent based on the above
business requirement?

  • A. window.addEventListener('load',personalizeWebsiteContext);
  • B. window.addEventListener('onload', personalizeWebsiteContext);
  • C. Document.addEventListener('''DOMContextLoaded' , personalizeWebsiteContext);
  • D. document.addEventListener(''onDOMContextLoaded', personalizeWebsiteContext);

Answer: A


NEW QUESTION # 136
Refer to the code below:

What value can a developer expect when referencing o,js,secondCity?

  • A. 'New York
  • B. 'new york'
  • C. An error
  • D. Undefined

Answer: B


NEW QUESTION # 137
Refer the following code

What is the value of array after code executes?

Answer:

Explanation:
1, 2, 3, 5


NEW QUESTION # 138
Refer to the code below:
Const searchTest = 'Yay! Salesforce is amazing!" ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?

  • A. > true > false
  • B. > 5 > 0
  • C. > 5 >undefined
  • D. > 5 > -1

Answer: C

Explanation:


NEW QUESTION # 139
A developer wrote the following code:
01 let X = object.value;
02
03 try {
04handleObjectValue(X);
05 } catch (error) {
06 handleError(error);
07 }
Thedeveloper has a getNextValue function to execute after handleObjectValue(), but does not want to execute getNextValue() if an error occurs.
How can the developer change the code to ensure this behavior?

  • A. 03 try{04 handleObjectValue(x);05 }catch(error){06 handleError(error);07 } then {08 getNextValue();09 }
  • B. 03 try {04 handleObjectValue(x)05 ........................
  • C. 03 try{04 handleObjectValue(x);05 } catch(error){06 handleError(error);07 }08 getNextValue();
  • D. 03 try{04 handleObjectValue(x);05 } catch(error){06 handleError(error);07 } finally {08 getNextValue();10 }

Answer: B


NEW QUESTION # 140
Refer to the code below:
01 const exec = (item, delay) =>{
02 new Promise(resolve => setTimeout( () => resolve(item), delay)),
03 async function runParallel() {
04 Const (result1, result2, result3) = await Promise.all{
05 [exec ('x', '100') , exec('y', 500), exec('z', '100')]
06 );
07 return `parallel is done: $(result1) $(result2)$(result3)`;
08 }
}
}
Which two statements correctly execute the runParallel () function?
Choose 2 answers

  • A. runParallel () .then(function(data) return data
  • B. Async runParallel () .then(data);
  • C. runParallel ( ). done(function(data){
    return data;
    });
  • D. runParallel () .then(data);

Answer: A,C


NEW QUESTION # 141
A developer creates a generic function to log custom messages In the console. To do this, the function below is implemented.

Which three console logging methods allow the use of string substitution in line 02?
Choose 3 answers

  • A. Info
  • B. Assert
  • C. Log
  • D. error
  • E. Message

Answer: B,D,E


NEW QUESTION # 142
Refer to the following code:
Let sampletext = 'The quick brown fox Jumps';
A developer need to determine if a certain substring is part of a string.
Which three expressions return true for the give substring? Choose 3 answers

  • A. sampleText.includes (quick', 4);
  • B. sampleText.includes (fox' , 3);
  • C. sampleText.inclides (fox');
  • D. sampleText.substing ('fox');
  • E. sampleText.indexof ('quick') 1== -1;

Answer: B


NEW QUESTION # 143
A class was written to represent items for purchase in an online store, and a second class Representing items that are on sale at a discounted price. THe constructor sets the name to the first value passed in. The pseudocode is below:
Class Item {
constructor(name, price) {
... // Constructor Implementation
}
}
Class SaleItem extends Item {
constructor (name, price, discount) {
...//Constructor Implementation
}
}
There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.
Let regItem =new Item('Scarf', 55);
Let saleItem = new SaleItem('Shirt' 80, -1);
Item.prototype.description = function () { return 'This is a ' + this.name; console.log(regItem.description()); console.log(saleItem.description()); SaleItem.prototype.description = function () { return 'This is a discounted ' + this.name; } console.log(regItem.description()); console.log(saleItem.description()); What is the output when executing the code above ?

  • A. This is a Scarf
    This is a Shirt
    This is a Scarf
    This is a discounted Shirt
  • B. This is aScarf
    Uncaught TypeError: saleItem.description is not a function
    This is a Shirt
    This is a did counted Shirt
  • C. This is a Scarf
    Uncaught TypeError: saleItem.description is not a function
    This is aScarf
    This is a discounted Shirt
  • D. This is a Scarf
    This is a Shirt
    This is a discounted Scarf
    This is a discounted Shirt

Answer: A


NEW QUESTION # 144
developer wants to use a module named universalContainersLib and them call functions
from it.
How should a developer import every function from the module and then call the fuctions foo
and bar ?

  • A. import * ad lib from '/path/universalContainersLib.js';
    lib.foo();
    lib.bar();
  • B. import * from '/path/universalContaineraLib.js';
    universalContainersLib.foo();
    universalContainersLib.bar();
  • C. import all from '/path/universalContaineraLib.js';
    universalContainersLib.foo();
    universalContainersLib.bar();
  • D. import (foo, bar) from '/path/universalContainersLib.js';
    foo();
    bar();

Answer: A


NEW QUESTION # 145
Refer to the code below:
Let inArray =[ [ 1, 2 ] , [ 3, 4, 5 ] ];
Which two statements result in the array [1, 2, 3, 4, 5] ?
Choose 2 answers

  • A. [ ]. concat.apply(inArray, [ ]);
  • B. [ ]. concat ( [ ....inArray ] );
  • C. [ ]. Concat.apply ([ ], inArray);
  • D. [ ]. Concat (... inArray);

Answer: C,D


NEW QUESTION # 146
Refer to the code below:

Which statement allows a developer to cancel the scheduled timed function?

  • A. ClearTimeout (timerId) ;
  • B. removeTimeout (timerId) ;
  • C. removeTimeout (timeFunction) ;
  • D. ClearTimeout (timeFunction);

Answer: C


NEW QUESTION # 147
There is a new requirement for a developer to implement a currPrice method that will return the current price of the item or sales..

What is the output when executing the code above

  • A. 50
    80
    72
  • B. 50
    80
    Uncaught Reference Error:this,discount is undefined
    72
  • C. 50
    Uncaught TypeError: saleItem,desrcription is not a function
    50
    80
  • D. 50
    80
    50
    72

Answer: D


NEW QUESTION # 148
Given HTML below:
<div>
<div id ="row-uc"> Universal Container</div>
<div id ="row-aa">Applied Shipping</div>
<div id ="row-bt"> Burlington Textiles </div>
</div>
Which statement adds the priority = account CSS class to the universal Containers row ?

  • A. Document .queryElementById('row-uc').addclass('priority-account');
  • B. Document .querySelectorALL('#row-uc').classList.add('priority-account');
  • C. Document .querySelector('#row-uc').classes.push('priority-account');
  • D. Document .querySelector('#row-uc').classList.add('priority-account');

Answer: A


NEW QUESTION # 149
Given the JavaScript below:

Which code should replace the placeholder comment on line 05 to highlight accounts that match the search string'

  • A. 'yellow : 'none'
  • B. null : 'yellow'
  • C. 'yellow' : null
  • D. 'none1 : "yellow'

Answer: A


NEW QUESTION # 150
Refer to the following code that imports a module named utils:
import (foo, bar) from '/path/Utils.js';
foo() ;
bar() ;
Which two implementations of Utils.js export foo and bar such that the code above runs without
error?
Choose 2 answers

  • A. const foo = () => { return 'foo' ; }
    const bar = () => { return 'bar' ; }
    export { bar, foo }
  • B. // FooUtils.js and BarUtils.js exist
    Import (foo) from '/path/FooUtils.js';
    Import (boo) from ' /path/NarUtils.js';
  • C. Export default class {
    foo() { return 'foo' ; }
    bar() { return 'bar' ; }
    }
  • D. const foo = () => { return 'foo';}
    const bar = () => {return 'bar'; }
    Export default foo, bar;

Answer: A,C


NEW QUESTION # 151
A developer wants to iterate through an array of objects and count the objects and count the objects whose property value, name, starts with the letter N.
Const arrObj = [{"name" : "Zach"} , {"name" : "Kate"},{"name" : "Alise"},{"name" : "Bob"},{"name" :
"Natham"},{"name" : "nathaniel"}
Refer to the code snippet below:
01 arrObj.reduce(( acc, curr) => {
02 //missing line 02
02 //missing line 03
04 ). 0);
Which missing lines 02 and 03 return the correct count?

  • A. Const sum = curr.startsWith('N') ? 1: 0;
    Return acc +sum
  • B. Const sum = curr.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • C. Const sum = curr.name.startsWIth('N') ? 1: 0;
    Return curr+ sum
  • D. Const sum = curr.name.startsWith('N') ? 1: 0;
    Return acc +sum

Answer: D


NEW QUESTION # 152
Given the code below:

Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute?

  • A. console.table(usersList) ;
  • B. console.group(usersList) ;
  • C. console.groupCol lapsed (usersList) ;
  • D. console.info(usersList) ;

Answer: B


NEW QUESTION # 153
A developer at Universal Containers is creating their new landing page basedon HTML, CSS, and JavaScript.
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is fully loaded (HTML content and all related files), in order to do some custom initializations.
Which implementation should be used to call Fe:s:-a;::eHec5;te::.-.ter.: based on the business requirement above?

  • A. Add a listener to the window object to handle the lead event
  • B. Add a listener to thewindow object to handle the DOMContentLoaded event
  • C. Add a handler to the personalizeWebsiteContent script to handlethe load event
  • D. Add a handler to the personalizeWebsiteContent script tohandle the DOMContentLoaded event

Answer: A


NEW QUESTION # 154
Refer to the code below:

What is display when the cod executes?

  • A. ReferenceError: b is not defined
  • B. A
  • C. Undefined
  • D. null

Answer: B


NEW QUESTION # 155
A developer has the function, shown below, that is called when a page loads.

Where can the developer see the log statement after loading the page in the browser?

  • A. Terminal running the web server.
  • B. Browser performance tools
  • C. Browser javaScript console
  • D. On the webpage

Answer: C


NEW QUESTION # 156
Refer to the following code block:

What is the console output?

  • A. > Better student Jackie got 100% on test.
  • B. > Better student Jackie got 70% on test.
  • C. > Jackie got 70% on test.
  • D. > Uncaught Reference Error

Answer: A


NEW QUESTION # 157
Universal Containers recently launched its new landing page to host a crowd-funding campaign. The page uses an external library to display some third-party ads. Once the page is fully loaded, it creates more than 50 new HTML items placed randomly insidethe DOM, like the one in the code below:

All the elements includes the same ad-library-item class, They are hidden by default, and they are randomly displayed while the user navigates through the page.

  • A. Use the DOM inspector to prevent the load eventto be fired.
  • B. Use the browser console to execute a scriptthat prevents the load event to be fired.
  • C. Use the DOM inspector to remove all the elements containing the class ad-library-item.
  • D. Use the browser to execute a script that removes all the element containing the class ad-library-item.

Answer: D


NEW QUESTION # 158
Refer to code below:
console.log(0);
setTimeout(() => (
console.log(1);
});
console.log(2);
setTimeout(() => {
console.log(3);
), 0);
console.log(4);
In which sequence will the numbers be logged?

  • A. 01234
  • B. 02413
  • C. 02431
  • D. 0

Answer: B


NEW QUESTION # 159
......

100% Real & Accurate JavaScript-Developer-I Questions and Answers with Free and Fast Updates: https://www.getvalidtest.com/JavaScript-Developer-I-exam.html

Get Unlimited Access to JavaScript-Developer-I Certification Exam Cert Guide: https://drive.google.com/open?id=1lj6JAevrgb_upQ2tAhwJ4tUKUxdPiR8h