ExamGecko
Ask Question

Salesforce Certified JavaScript Developer I Practice Test - Questions Answers, Page 8

Add to Whishlist

List of questions

Question 71

Report Export Collapse

Refer to the code below:

Salesforce Certified JavaScript Developer I image Question 71 63742 09232024002545000000

Line 05 causes an error.

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

Become a Premium Member for full access
  Unlock Premium Member

Question 72

Report Export Collapse

Refer to the code below:

Let str = 'javascript';

Str[0] = 'J';

Str[4] = 'S';

After changing the string index values, the value of str is 'javascript'. What is the reason for this value:

Become a Premium Member for full access
  Unlock Premium Member

Question 73

Report Export Collapse

Refer to 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?"));

Salesforce Certified JavaScript Developer I image Question 73 63744 09232024002545000000

When does Promise.finally on line 08 get called?

Become a Premium Member for full access
  Unlock Premium Member

Question 74

Report Export Collapse

Refer to the following array:

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

Salesforce Certified JavaScript Developer I image Question 74 63745 09232024002545000000

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

Become a Premium Member for full access
  Unlock Premium Member

Question 75

Report Export Collapse

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?

Become a Premium Member for full access
  Unlock Premium Member

Question 76

Report Export Collapse

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?

Become a Premium Member for full access
  Unlock Premium Member

Question 77

Report Export Collapse

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 for a button with class= "blue". The test fails because no such button is found.

Which type of test category describes this test?

Become a Premium Member for full access
  Unlock Premium Member

Question 78

Report Export Collapse

Which two code snippets show working examples of a recursive function?

Choose 2 answers

Become a Premium Member for full access
  Unlock Premium Member

Question 79

Report Export Collapse

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

Become a Premium Member for full access
  Unlock Premium Member

Question 80

Report Export Collapse

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

True + '13' + NaN

Become a Premium Member for full access
  Unlock Premium Member
Total 224 questions
Go to page: of 23
Search

Related questions