ExamGecko
Home Home / Salesforce / Certified JavaScript Developer I

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

Question list
Search
Search

Related questions











Refer to the following code:

Which statement should be added to line 09 for the code to display 'The boat has a capacity of 10 people?

A.
super.size = size;
A.
super.size = size;
Answers
B.
ship.size size;
B.
ship.size size;
Answers
C.
super (size);
C.
super (size);
Answers
D.
this.size = size;
D.
this.size = size;
Answers
Suggested answer: D

Refer to the following array:

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

Which three options result in x evaluating as [1, 2]?

Choose 3 answer

A.
let x = arr. slice (2);
A.
let x = arr. slice (2);
Answers
B.
let x = arr. slice (0, 2);
B.
let x = arr. slice (0, 2);
Answers
C.
let x arr.filter((a) => (return a <= 2 });
C.
let x arr.filter((a) => (return a <= 2 });
Answers
D.
let x = arr.filter ((a) => 2 }) ;
D.
let x = arr.filter ((a) => 2 }) ;
Answers
E.
let x =arr.splice(0, 2);
E.
let x =arr.splice(0, 2);
Answers
Suggested answer: B, C, E

Refer to the following code:

What is the value of output on line 11?

A.
[1, 2]
A.
[1, 2]
Answers
B.
[''foo'', ''bar'']
B.
[''foo'', ''bar'']
Answers
C.
[''foo'':1, ''bar'':2'']
C.
[''foo'':1, ''bar'':2'']
Answers
D.
An error will occur due to the incorrect usage of the for…of statement on line 07.
D.
An error will occur due to the incorrect usage of the for…of statement on line 07.
Answers
Suggested answer: D

Refer to the code declarations below:

Which three expressions return the string JavaScript?

Choose 3 answers

A.
Str1.join (str2);
A.
Str1.join (str2);
Answers
B.
Str1.concat (str2);
B.
Str1.concat (str2);
Answers
C.
Concat (str1, str2);
C.
Concat (str1, str2);
Answers
D.
$(str1) $ (str2} ';
D.
$(str1) $ (str2} ';
Answers
E.
Str1 + str2;
E.
Str1 + str2;
Answers
Suggested answer: B, D, E

A developer has the following array of hourly wages:

Let arr = (8, 5, 9, 75, 11, 25, 7, 75, , 13, 25);

For workers making less than $10 an hour rate should be multiple by 1.25 and returned in a new array.

How should the developer implement the request?

A.
let arrl = arr.filter((val) => val < 10).map((num) -> num = 1.25);
A.
let arrl = arr.filter((val) => val < 10).map((num) -> num = 1.25);
Answers
B.
let arrl = arr .rr.acArray ((val) => ( val < 10 )) ,map((num) => { num * 1.25 ));
B.
let arrl = arr .rr.acArray ((val) => ( val < 10 )) ,map((num) => { num * 1.25 ));
Answers
C.
let arrl = arr-map((num) => { return ran * 1.25 }).filter((val) -> { return val < 10));
C.
let arrl = arr-map((num) => { return ran * 1.25 }).filter((val) -> { return val < 10));
Answers
D.
let arrl = arr.filterBy((val) => val < 10 ).aapBy<(num) -> num = ..25 );
D.
let arrl = arr.filterBy((val) => val < 10 ).aapBy<(num) -> num = ..25 );
Answers
Suggested answer: C

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

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

A.
window.name is assigned to 'hello' and the variable = remains undefined.
A.
window.name is assigned to 'hello' and the variable = remains undefined.
Answers
B.
window.m Is assigned the correct object.
B.
window.m Is assigned the correct object.
Answers
C.
The m variable is assigned the correct object but this.name remains undefined.
C.
The m variable is assigned the correct object but this.name remains undefined.
Answers
D.
The m variable is assigned the correct object.
D.
The m variable is assigned the correct object.
Answers
Suggested answer: A

Given the following code, what is the value of x?

let x = '15' + (10 * 2);

A.
35
A.
35
Answers
B.
50
B.
50
Answers
C.
1520
C.
1520
Answers
D.
3020
D.
3020
Answers
Suggested answer: C

Given the code below:

Which three code segments result in a correct conversion from number to string? Choose 3 answers

A.
let strValue = numValue. toString();
A.
let strValue = numValue. toString();
Answers
B.
let strValue = * * 4 numValue;
B.
let strValue = * * 4 numValue;
Answers
C.
let strValue = numValue.toText ();
C.
let strValue = numValue.toText ();
Answers
D.
let scrValue = String(numValue);
D.
let scrValue = String(numValue);
Answers
E.
let strValue = (String)numValue;
E.
let strValue = (String)numValue;
Answers
Suggested answer: A, B, D

Given the code below:

What is logged to the console'

A.
1 2 3 4 5
A.
1 2 3 4 5
Answers
B.
1 2 5 3 4
B.
1 2 5 3 4
Answers
C.
2 5 1 3 4
C.
2 5 1 3 4
Answers
D.
2 5 3 4 1
D.
2 5 3 4 1
Answers
Suggested answer: D

Given the HTML below:

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

A.
document. querySelector (#row-uc'). classes-push('priority-account');
A.
document. querySelector (#row-uc'). classes-push('priority-account');
Answers
B.
document. getElementByid('row-uc').addClass('priority-account*);
B.
document. getElementByid('row-uc').addClass('priority-account*);
Answers
C.
document. querySelectorAll('#row-uc') -classList.add("priority-accour');
C.
document. querySelectorAll('#row-uc') -classList.add("priority-accour');
Answers
D.
document. queryselector('#row-uc').ClassList.add('priority-account');
D.
document. queryselector('#row-uc').ClassList.add('priority-account');
Answers
Suggested answer: D
Total 224 questions
Go to page: of 23