Summer Certification Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Salesforce Developer JavaScript-Developer-I Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam JavaScript-Developer-I Premium Access

View all detail and faqs for the JavaScript-Developer-I exam


723 Students Passed

91% Average Score

94% Same Questions
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

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?

Options:

A.

> true > false B. > 5 >undefined

B.

> 5 > -1

C.

> 5 > 0

Questions # 32:

What are two unique features of functions defined with a fat arrow as compared to normal function definition?

Choose 2 answers

Options:

A.

The function generated its own this making it useful for separating the function’s scope from its enclosing scope.

B.

The function receives an argument that is always in scope, called parentThis, which is the enclosing lexical scope. C. If the function has a single expression in the function body, the expression will be evaluated and implicit returned.

C.

The function uses the this from the enclosing scope.

Questions # 33:

A developer initiates a server with the file server,js and adds dependencies in the source codes package,json that are required to run the server.

Which command should the developer run to start the server locally?

Options:

A.

start server,js

B.

npm start server,js

C.

npm start

D.

node start

Questions # 34:

Given the code below:

const delay = async delay =>{

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

console.log(1);

setTimeout(resolve,deleay);

});

};

const callDelay =async ()=>{

console.log(2);

const yup = await delay(1000);

console.log(3);

}

console.log(4);

callDelay();

console.log(5);

What is logged to the console?

Options:

A.

4 2 1 5 3

Questions # 35:

A developer at Universal Containers is creating their new landing page based on 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?

Options:

A.

Add a listener to thewindow object to handle the DOMContentLoaded event

B.

Add a handler to the personalizeWebsiteContent script to handle the load event

C.

Add a listener to the window object to handle the lead event

D.

Add a handler to the personalizeWebsiteContent script tohandle the DOMContentLoaded event

Questions # 36:

Refer to HTML below:

This card is smaller.

The width and height of this card is determined by its

contents.

Which expression outputs the screen width of the element with the ID card-01?

Options:

A.

document.getElementById(‘ card-01 ’).getBoundingClientRest().width

B.

document.getElementById(‘ card-01 ’).style.width

C.

document.getElementById(‘ card-01 ’).width

D.

document.getElementById(‘ card-01 ’).innerHTML.lenght*e

Questions # 37:

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?

Options:

A.

Console.assert (await functionUnderTest(true), ‘ OK ’)

B.

Console.assert (await functionUnderTest(true), ‘ not OK ’)

C.

Console.assert (await functionUnderTest(true), ‘ notOK ’)

D.

Console.assert (await functionUnderTest(true), ‘OK’)

Questions # 38:

Refer to the code below:

Const myFunction = arr => {

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

Return result = current;

}, 10};

}

What is the output of this function when called with an empty array ?

Options:

A.

Returns 0

B.

Throws an error

C.

Returns 10

D.

Returns NaN

Questions # 39:

Which option is a core Node,js module?

Options:

A.

Path

B.

Ios

C.

Memory

D.

locate

Questions # 40:

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

Options:

A.

The associated class contains some asynchronous functions.

B.

The associated function will always return a promise

C.

Theassociated function can only be called via asynchronous methods

D.

The associated sometimes returns a promise.

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.