Updated Salesforce Javascript Developer I Dumps (V12.02) – Start Your Preparation for Your Salesforce Certified JavaScript Developer I Exam

Cracking the Salesforce Certified JavaScript Developer I certification exam can be guaranteed by DumpsBase to help you open doors to high-paying jobs, coveted promotions, and increased professional respect. We updated Salesforce JavaScript Developer I dumps to V12.02 with 230 practice exam questions and answers, which will equip you with the knowledge and confidence you need to ace your Javascript Developer I exam and propel your IT career forward. Furthermore, DumpsBase offers up to 12 months of FREE updates on Javascript Developer I dumps. These Javascript Developer I exam dumps updates ensure you study the most relevant Salesforce Javascript Developer I content. Start your Salesforce Javascript Developer I test preparation today with the most updated Salesforce Javascript Developer I dumps (V12.02) from DumpsBase.

Salesforce Javascript Developer I Free Dumps Online to Help You Verify

1. Refer to the code below:

01 const exec = (item, delay) =>{

02 newPromise(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 );

7 return `parallel is done: $(result1)$(result2)$(result3)`;

8 }

}

}

Which two statements correctly execute the runParallel () function? Choose 2 answers

2. A developer needs to test this function:

01const sum3 = (arr) => (

02if (!arr.length) return 0,

03if (arr.length === 1) return arr[0],

04if (arr.length === 2) return arr[0]+ arr[1],

05 return arr[0] + arr[1] + arr[2],

06 );

Which two assert statements are valid tests for the function?

Choose 2 answers

3. Which statement phrases successfully?

4. catch( arr => (

10 console.log(“Race is cancelled.”, err);

11 ));

What is the value of result when Promise.race executes?

5. Works in both the browser and Node.js.

Which meet the requirements?

6. 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 this new requirement?

7. Which three statements are true about promises? Choose 3 answers

8. Given the code below:

01 function GameConsole (name) {

02 this.name = name;

3 }

4

5 GameConsole.prototype.load = function(gamename) {

6 console.log (` $(this.name) is loading agame: $(gamename) …`);

7 )

8 function Console 16 Bit (name) {

9 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 . . .

9. 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?

10. 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

11. 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*/;

6 )};

7 }

Which code should replace the placeholder comment on line 05 to hide accounts that do not match the search string?

12. 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?

13. 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 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

14. 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”: “[email protected]”,

04 “age”: 25

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

15. 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?

16. 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 letterN.

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?

17. A developer creates a class that represents a blog post based on the requirement that a Post should have a body author and view count.

The Code shown Below:

Class Post{

// Insert code here This.body =body This.author = author; this.viewCount = viewCount;

}

}

Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instanceof a Post with the three attributes correctly populated?

18. Which three options show valid methods for creating a fat arrow function?

Choose 3 answers

19. Refer to the code below:

const event = new CustomEvent(

//Missing Code

);

obj.dispatchEvent(event);

A developer needs to dispatch a custom event called update to send information about recordId.

Which two options could a developer insert at the placeholder in line 02 to achieve this? Choose 2 answers

20. Refer to the code below:

Const pi = 3.1415326,

What is the data type of pi?

21. A developer is required to write a function that calculates the sum of elements in an array but is getting undefined every time the code is executed.

The developer needs to find what is missing in the code below.

Const sumFunction = arr => {

Return arr.reduce((result, current) => {

//

Result += current;

//

), 10);

);

Which option makes the code work as expected?

22. Given code below:

setTimeout (() => (

console.log (1);

). 0);

console.log (2);

New Promise ((resolve, reject)) = > (

setTimeout(() => (

reject (console.log (3));

). 1000);

)).catch (() => (

console.log (4);

));

console.log (5);

What is logged to the console?

23. Which statement accurately describes the behaviour of the async/ await keyworks?

24. A developer is debugging a web server that uses Node.js The server hits a runtime error every third request to an important endpoint on the web server.

The developer added a break point to the start script, that is at index.js at he root of the server’s source code. The developer wants to make use of chrome DevTools to debug.

Which command can be run to access DevTools and make sure the breakdown is hit?

25. Refer to the code below:

Async funct on functionUnderTest(isOK) {

If (isOK) return ‘OK’;

Throw new Error(‘not OK’);

)

Which assertion accurately tests the above code?

26. Consider type coercion, what does the following expression evaluate to?

True + 3 + ‘100’ + null

27. A Developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three number in the array, The test passes:

Let res = sum2([1, 2, 3]);

console.assert(res === 6 );

Res = sum3([ 1, 2, 3, 4]);

console.assert(res=== 6);

A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array.

The test passes:

Which two results occur when running the test on the updated sum3 function? Choose 2 answers

28. A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console.

Here is the HTML file content:

<input type =” text” value=” Hello” name =” input”>

<button type =” button” >Display </button>

The developer wrote the javascript codebelow:

Const button = document.querySelector(‘button’);

button.addEvenListener(‘click’, () => (

Const input = document.querySelector(‘input’);

console.log(input.getAttribute(‘value’));

When the user clicks the button, the output is always “Hello”.

What needs to be done make this code work as expected?

29. A developer creates an object where its properties should be immutable and prevent properties from being added or modified.

Which method should be used to execute this business requirement?

30. A developer has an ErrorHandler module that contains multiple functions.

What kind of export be leverages so that multiple functions can beused?

31. A team that works on a big project uses npm to deal with projects dependencies.

A developer added a dependency does not get downloaded when they execute npm install.

Which two reasons could be possible explanations for this? Choose 2 answers

32. A developer is asked to fix some bugs reported by users. To do that, the developer adds abreakpoint for debugging.

Function Car (maxSpeed, color) {

This.maxspeed =masSpeed;

This.color = color;

Let carSpeed = document.getElementById(‘ CarSpeed’);

Debugger;

Let fourWheels =new Car (carSpeed.value, ‘red’);

When the code execution stops at the breakpoint on line 06, which two types of information are available in the browser console? Choose 2 answers:

33. At Universal Containers, every team has its own way of copying JavaScript objects.

The code Snippet shows an implementation from one team:

Function Person() {

this.firstName = “John”;

this.lastName = ‘Doe’;

This.name =() => (

console.log(‘Hello $(this.firstName) $(this.firstName)’);

)}

Const john = new Person ();

Const dan =JSON.parse(JSON.stringify(john));

dan.firstName =’Dan’;

dan.name();

What is the Output of the code execution?

34. Refer to the code below:

Let textValue = ’1984’;

Which code assignment shows a correct way to convert this string to an integer?

35. A developer writers the code below to calculate the factorial of a given number.

Function factorial(number) {

Return number + factorial(number -1);

}

factorial(3);

What is the resultof executing line 04?

36. Given the following code:

Let x =null;

console.log(typeof x);

What is the output of the line 02?

37. Which function should a developer use to repeatedly execute code at a fixed interval?

38. Refer to the code below:

Function changeValue(obj) {

Obj.value = obj.value/2;

}

Const objA = (value: 10);

Const objB = objA;

changeValue(objB);

Const result = objA.value;

What is the value of result after the code executes?

39. Given HTML below:

<div>

<div id =”row-uc”> UniversalContainer</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?

40. GIven a value, which three options can a developer use to detect if thevalue is NaN? Choose 3 answers

41. developer wants to use a module named universalContainersLib and them callfunctions

from it.

How should a developer import every function from the module and then call the functions foo and bar?

42. Refer to the code snippet:

Function getAvailabilityMessage(item) {

If (getAvailability(item)){

Var msg =”Username available”;

}

Return msg;

}

A developer writes this code to return a message to user attempting to register a new username. If the username is available, variable.

What is the return value of msg hen getAvailabilityMessage (“newUserName” ) is executed and getAvailability(“newUserName”) returns false?

43. Given the requirement to refactor the code above to JavaScript class format, which class definition is correct?

A)

B)

C)

D)

44. A developer wants to set up a secure web server withNode.js. The developer creates a directory locally called app-server, and the first file is app-server/index.js

Without using any third-party libraries, what should the developer add to index.js to create the secure web server?

45. Given the code below:

const delay = sync delay => {

Return new Promise ((resolve, reject) => {

setTimeout (resolve,delay);});};

const callDelay =async () => {

const yup =await delay (1000);

console.log (1);

What is logged to the console?

46. Refer to the following code:

Let obj ={

Foo: 1,

Bar: 2

}

Let output =[],

for(let something in obj{

output.push(something);

}

console.log(output);

What is the output line 11?

47. Refer to the code below?

Let searchString = ‘look for this’;

Which two options remove the whitespace from the beginning of searchString? Choose 2 answers

48. Whichthree actions can be using the JavaScript browser console? Choose 3 answers:

49. In which situation should a developer include a try .. catch block around their function call?

50. 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?

51. Given the following code:

Let x =(‘15’ + 10)*2;

What is the value of a?

52. Refer to the following code:

01 function Tiger(){

02this.Type = ‘Cat’;

03 this.size = ‘large’;

4 }

5

6 let tony = new Tiger();

7 tony.roar = () =>{

8 console.log(‘They’re great1’);

9 };

10

11 function Lion(){

12 this.type = ‘Cat’;

13 this.size = ‘large’;

14 }

15

16 let leo = new Lion();

17 //Insertcode here

18 leo.roar();

Which two statements could be inserted at line 17 to enable the function call on line 18? Choose 2 answers.

53. Which statement accurately describes an aspect of promises?

54. Given the code below:

FunctionmyFunction(){

A =5; Var b =1;

}

myFunction();

console.log(a);

console.log(b);

What is the expected output?

55. Which two console logs outputs NaN? Choose 2 answers

56. Given the following code:

Counter = 0;

const logCounter = () => {

console.log(counter);

);

logCounter();

setTimeout(logCOunter, 1100);

setInterval(() => {

Counter++

logCounter();

}, 1000);

What is logged by the first four log statements?

57. Refer to the code below:

Function Person (firstName, lastName, eyecolor) {

this.firstName =firstName;

this.lastName = lastName;

this.eyeColor = eyeColor;

}

Person.job = ‘Developer’;

const myFather = new Person(‘John’, ‘Doe’);

console.log(myFather.job);

What is the output after the code executes?

58. 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?

59. A developer is leading the creation of a new browser application that will serve a single page application. The team wants to use a new web framework Minimalsit.js. The Lead developer wants to advocate for a more seasoned web framework that already has a community around it.

Which two frameworks should the lead developer advocate for? Choose 2 answers

60. 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 inside the 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.

61. Which code statement correctly retrieves and returns an object from localStorage?

62. is below:

<input type=”file” onchange=”previewFile()”>

<img src=”” height=”200” alt=”Image Preview…”/>

The JavaScript portion is:

01 functionpreviewFile(){

02 const preview = document.querySelector(‘img’);

3 const file = document.querySelector(‘input[type=file]’).files[0];

4 //line 4 code

5 reader.addEventListener(“load”, () => {

6 preview.src = reader.result;

7 },false);

08 //line 8 code

09 }

In lines 04 and 08, which code allows the user to select an image from their local computer, and to display the image in the browser?

63. A developer creates a genericfunction to log custom messages in the console. To do this, the function below is implemented.

01 function logStatus(status){

02 console./*Answer goes here*/{‘Item status is: %s’, status};

03 }

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

64. A developer wrote the following code:

01 let X = object.value;

02

03 try {

4 handleObjectValue(X);

5 } catch (error) {

6 handleError(error);

7 }

The developer 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?

65. Refer to the code:

Given the code above, which three properties are set pet1? Choose 3 answers:

66. Refer to the code below:

Let car1 = new Promise((_, reject) =>

setTimeout(reject, 2000, “car 1 crashed in” =>

Let car2 =new Promise(resolve => setTimeout(resolve, 1500, “car 2 completed”)

Let car3 =new Promise(resolve =>setTimeout(resolve, 3000, “car 3 completed”)

Promise.race(( car1, car2, car3))

.then (value => (

Let result = ‘$(value) the race.’;)}

.catch(arr => {

console.log(“Race is cancelled.”, err);

});

What is the value of result when Promise.race executes?

67. Refer to the following code:

Let sampleText = ‘The quick brown fox jumps’;

A developer needs to determine if a certainsubstring is part of a string.

Which three expressions return true for the given substring? Choose 3 answers

68. Given two expressions var1 and var2.

What are two valid ways to return the logical AND of the two expressions and ensure it is data type Boolean? Choose 2 answers:

69. Cloud Kicks has a class to represent items for sale in an online store, as shown below:

Class Item{

constructor (name, price){

this.name = name;

this.price = price;

}

formattedPrice(){

return ‘s’ + String(this.price);}}

A new business requirement comes in that requests a ClothingItem class that should have all of the properties and methods of the Item class but will also have properties that are specific to clothes.

Which line of code properly declares the clothingItem class such that it inherits from Item?

70. Refer to the code below:

Line 05 causes an error.

What are the values of greeting and salutation once code completes?

71. Refer to the code below:

Let str = ‘javascript’;

Str[0] = ‘J’;

Str[4] = ’S’;

After changing the string indexvalues, the value of str is ‘javascript’.

What is the reason for this value:

72. Referto the code below:

new Promise((resolve, reject) => {

const fraction = Math.random();

if( fraction >0.5) reject("fraction > 0.5, " + fraction);

resolve(fraction);

})

.then(() =>console.log("resolved"))

.catch((error) => console.error(error))

.finally(() =>console.log(" when am I called?"));

When does Promise.finally on line 08 get called?

73. Refer to the following array:

Let arr1 = [ 1,2, 3, 4, 5 ];

Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?

74. Refer to code below:

Function muFunction(reassign){

Let x = 1;

var y = 1;

if (reassign) {

Let x= 2;

Var y = 2;

console.log(x);

console.log(y);}

console.log(x);

console.log(y);}

What is displayed when myFunction(true) is called?

75. A developer wants to create an object from a function in the browser using the code below:

Function Monster() { this.name = ‘hello’ };

Const z = Monster();

What happens due to lack of the new keyword on line 02?

76. developer removes the HTML class attribute from the checkout button, so now it is simply:

<button>Checkout</button>.

There is a test to verify the existence of the checkout button, however it looks fora button with class= “blue”. The test fails because no such button is found.

Which type of test category describes this test?

77. Which two code snippets show working examples of a recursive function? Choose 2 answers

78. Refer to the HTML below:

<div id=”main”>

<ul>

<li>Leo</li>

<li>Tony</li>

<li>Tiger</li>

</ul>

</div>

Which JavaScript statement results in changing “ Tony” to “Mr. T.”?

79. Considering type coercion, what does the following expression evaluate to?

True + ‘13’ + NaN

80. A developer wrote a fizzbuzz function that when passed in a number, returns the following:

● ‘Fizz’ if the number is divisible by 3.

● ‘Buzz’ if the number is divisible by 5.

● ‘Fizzbuzz’ if the number is divisible by both 3 and 5.

● Empty string if the number is divisible by neither 3 or 5.

Which two test cases will properly test scenarios for the fizzbuzz function? Choose 2 answers

81. A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code:

function calculateBill (items) {

let total = 0;

total += findSubTotal(items);

total += addTax(total);

total += addTip(total);

return total;

}

Which option allows the developer to step into each function execution within calculateBill?

82. The developer has a function that prints “Hello” to an input name.

To test this,thedeveloper created a function that returns “World”. However the following snippet does not print “Hello World”.

What can the developer do to change the code to print “Hello World”?

83. A developer has the function, shown below, that is called when a page loads.

function onload() {

console.log(“Page has loaded!”);

}

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

84. Refer to the code below:

letsayHello = () => {

console.log (‘Hello, world!’);

};

Which code executes say Hello once, two minutes from now?

85. What is the result of the code block?

86. 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

87. 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 the developer has, which code logs an error at boost with an event?

88. Refer to the following code:

function test (val) {

If (val === undefined) {

return ‘Undefined values!’ ;

}

if (val === null) {

return ‘Null value! ’;

}

return val;

}

Let x;

test(x);

What is returned by the function call on line 13?

89. Which code statement below correctly persists an objects in local Storage?

90. Given the code below:

const copy = JSON.stringify([ newString(‘ false ’), new Bollean( false ), undefined ]);

What is the value of copy?


 

Get Updated Salesforce Sales Cloud Consultant Dumps (V15.02) of DumpsBase for Passing the Salesforce Certified Sales Cloud Consultant Exam on the First Attempt
Salesforce MuleSoft Integration Architect I Dumps [2024] - Get Ready for Salesforce Certified MuleSoft Integration Architect I Exam Preparation