Weekend Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale65best

Free Salesforce JavaScript-Developer-I Practice Exam with Questions & Answers | Set: 5

Questions 41

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?

Options:
A.

2.0.0

B.

1.2.3

C.

1.1.4

D.

1.2.0

Questions 42

Which statement can a developer apply to increment the browser's navigation history without a page refresh?

Which statement can a developer apply to increment thebrowser's navigation history without a page refresh?

Options:
A.

window.history.pushState(newStateObject);

B.

window.history.pushStare(newStateObject, ' ', null);

C.

window.history.replaceState(newStateObject,'', null);

D.

window.history.state.push(newStateObject);

Questions 43

myArraym can have one level, two levels, or morelevels.

Which statement flattens myArray when it can be arbitrarily nested?

Options:
A.

myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);

B.

myArray. join (",").split (",");

C.

[ ] .concat {. . .myArray) ;

D.

myArray.flat(Infinity);

Questions 44

Given the HTML below:

JavaScript-Developer-I Question 44

Which statement adds the priority-account CSS class to the Universal Containers row?

Options:
A.

document. querySelector (#row-uc').classes-push('priority-account');

B.

document. getElementByid('row-uc').addClass('priority-account*);

C.

document. querySelectorAll('#row-uc') -classList.add("priority-accour');

D.

document. queryselector('#row-uc').ClassList.add('priority-account');

Questions 45

Refer to the code below:

ConstresolveAfterMilliseconds = (ms) => Promise.resolve (

setTimeout ((=> console.log(ms), ms ));

Const aPromise = await resolveAfterMilliseconds(500);

Const bPromise = await resolveAfterMilliseconds(500);

Await aPromise, wait bPromise;

What is the result of running line 05?

Options:
A.

aPromise and bPromise run sequentially.

B.

Neither aPromise or bPromise runs.

C.

aPromise and bPromise run in parallel.

D.

Only aPromise runs.

Questions 46

A developer is leading the creation of a new web server for their team that will fulfill API requests from an existing client.

The team wants a web server that runs on Node.Js, and they want to use thenew web framework Minimalist.Js. The lead developer wants to advocate for a more seasoned back-end framework that already has a community around it.

Which two frameworks could the lead developer advocate for?

Choose 2 answers

Options:
A.

Gatsby

B.

Angular

C.

Express

D.

Koa

Questions 47

Refer to the code below:

let timeFunction =() => {

console.log(‘Timer called.”);

};

let timerId = setTimeout (timedFunction, 1000);

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

Options:
A.

removeTimeout(timedFunction);

B.

removeTimeout(timerId);

C.

clearTimeout(timerId);

D.

clearTimeout(timedFunction);

Questions 48

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

Options:
A.

userInformation(“email”)

B.

userInformation.get(“email”)

C.

userInformation.email

D.

userInformation(email)

Questions 49

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 theJavaScript 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

Options:
A.

On line 02, use event.first to test if it is the first execution.

B.

On line 04, useevent.stopPropagation ( ),

C.

On line 04, use button.removeEventListener(‘ click” , listen);

D.

On line 06, add an option called once to button.addEventListener().

Questions 50

A developer has the following array of student test grades:

Let arr = [ 7, 8, 5, 8, 9 ];

The Teacherwants to double each score and then see an array of the students

who scored more than 15 points.

How should thedeveloper implement the request?

Options:
A.

Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))

B.

Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;

C.

Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);

D.

Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));

Salesforce Free Exams

Salesforce Free Exams
Examstrack provides free Salesforce exam prep materials and practice tests to support your Salesforce certification goals.