ExamGecko
Home Home / Salesforce / Certified JavaScript Developer I

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

Question list
Search
Search

Related questions











Refer to the following code:

What is the output of line 11?

A.
[1,2]
A.
[1,2]
Answers
B.
["bar", "foo"]
B.
["bar", "foo"]
Answers
C.
["foo:1", "bar:2"]
C.
["foo:1", "bar:2"]
Answers
D.
["foo", "bar"]
D.
["foo", "bar"]
Answers
Suggested answer: D

Considering the implications of 'use strict' on line 04, which three statements describe the execution of the code?

Choose 3 answers

A.
z is equal to 3.14.
A.
z is equal to 3.14.
Answers
B.
'use strict' is hoisted, so it has an effect on all lines.
B.
'use strict' is hoisted, so it has an effect on all lines.
Answers
C.
'use strict' has an effect only on line 05.
C.
'use strict' has an effect only on line 05.
Answers
D.
'use strict' has an effect between line 04 and the end of the file.
D.
'use strict' has an effect between line 04 and the end of the file.
Answers
E.
Line 05 throws an error.
E.
Line 05 throws an error.
Answers
Suggested answer: A, C, E

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 the browser's navigation history without a page refresh?

A.
window.history.pushState(newStateObject);
A.
window.history.pushState(newStateObject);
Answers
B.
window.history.pushStare(newStateObject, ' ', null);
B.
window.history.pushStare(newStateObject, ' ', null);
Answers
C.
window.history.replaceState(newStateObject,' ', null);
C.
window.history.replaceState(newStateObject,' ', null);
Answers
D.
window.history.state.push(newStateObject);
D.
window.history.state.push(newStateObject);
Answers
Suggested answer: C

Refer to the following code block:

What is the console output?

A.
> Better student Jackie got 70% on test.
A.
> Better student Jackie got 70% on test.
Answers
B.
> Jackie got 70% on test.
B.
> Jackie got 70% on test.
Answers
C.
> Uncaught Reference Error
C.
> Uncaught Reference Error
Answers
D.
> Better student Jackie got 100% on test.
D.
> Better student Jackie got 100% on test.
Answers
Suggested answer: D

Refer to the code below:

Considering that JavaScript is single-threaded, what is the output of line 08 after the code executes?

A.
10
A.
10
Answers
B.
11
B.
11
Answers
C.
12
C.
12
Answers
D.
13
D.
13
Answers
Suggested answer: B

Given the code below:

Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute?

A.
console.group(usersList) ;
A.
console.group(usersList) ;
Answers
B.
console.table(usersList) ;
B.
console.table(usersList) ;
Answers
C.
console.info(usersList) ;
C.
console.info(usersList) ;
Answers
D.
console.groupCol lapsed (usersList) ;
D.
console.groupCol lapsed (usersList) ;
Answers
Suggested answer: A

Refer to the code below:

Which value can a developer expect when referencing country,capital,cityString?

A.
'London'
A.
'London'
Answers
B.
undefined
B.
undefined
Answers
C.
An error
C.
An error
Answers
D.
'NaN'
D.
'NaN'
Answers
Suggested answer: D

Refer to the code below:

What is the value of result after line 10 executes?

A.
Error: myFather.job is not a function
A.
Error: myFather.job is not a function
Answers
B.
John Developer
B.
John Developer
Answers
C.
undefined Developer
C.
undefined Developer
Answers
D.
John undefined
D.
John undefined
Answers
Suggested answer: B

Which two options are core Node.js modules?

Choose 2 answers

A.
worker
A.
worker
Answers
B.
isotream
B.
isotream
Answers
C.
exception
C.
exception
Answers
D.
http
D.
http
Answers
Suggested answer: B, D

A developer is trying to handle an error within a function.

Which code segment shows the correct approach to handle an error without propagating it elsewhere?

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: D
Total 224 questions
Go to page: of 23