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

A developer is working on an ecommerce website where the delivery date is dynamically calculated based on the current day. The code line below is responsible for this calculation.
Const deliveryDate = new Date ();
Due to changes in the business requirements, the delivery date must now be today's date + 9 days.
Which code meets thisnew requirement?

  1. deliveryDate.setDate(( new Date ( )).getDate () +9);
  2. deliveryDate.setDate( Date.current () + 9);
  3. deliveryDate.date = new Date(+9) ;
  4. deliveryDate.date = Date.current () + 9;

Answer(s): A



Which three statements are true about promises ?
Choose 3 answers

  1. The executor of a new Promise runs automatically.
  2. A Promise has a .then() method.
  3. A fulfilled or rejected promise will not change states .
  4. A settled promise can become resolved.
  5. A pending promise canbecome fulfilled, settled, or rejected.

Answer(s): A,B,C



Given the code below:
01 function GameConsole (name) {
02 this.name = name;
03 }
05 GameConsole.prototype.load = function(gamename) {
06 console.log( ` $(this.name) is loading agame : $(gamename) ...`); 07 )
08 function Console 16 Bit (name) {
09 GameConsole.call(this, name) ;
10 }
11 Console16bit.prototype = Object.create ( GameConsole.prototype) ; 12 //insert code here
13 console.log( ` $(this.name) is loading a cartridge game :$(gamename) ...`); 14 }
15 const console16bit = new Console16bit(` SNEGeneziz '); 16 console16bit.load(` Super Nonic 3x Force ');
What should a developer insert at line 15 to output the following message using the method ?
> SNEGeneziz is loading a cartridgegame: Super Monic 3x Force . . .

  1. Console16bit.prototype.load(gamename) = function() {
  2. Console16bit.prototype.load = function(gamename) {
  3. Console16bit = Object.create(GameConsole.prototype).load = function(gamename) {
  4. Console16bit.prototype.load(gamename) {

Answer(s): B



A developer has the following array of student test grades:
Let arr = [ 7, 8, 5, 8, 9 ];
The Teacher wants to double each score and then see an array of the students who scored more than 15 points.
How should thedeveloper implement the request?

  1. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
  2. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
  3. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
  4. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));

Answer(s): C



A test has a dependency on database.query. During the test the dependency is replaced with an object called database with the method, query, that returns an array. The developer needs to verify how many times the method was called and the arguments used each time.
Which two test approaches describe the requirement?
Choose 2 answers

  1. Integration
  2. Black box
  3. White box
  4. Mocking

Answer(s): C,D



Viewing Page 2 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