logo
Exam overview and study plan

Certified JavaScript Developer Practice Questions

Certified JavaScript Developer

Read questions, check verified answers and discuss the reasoning. Use reading options to shape your revision, or switch to the simulator for timed practice.

View 58 free questions

58 questions in this view

Page 1 of 10

Question 1

Given the code below:

01 function Person(name, email) {
02   this.name = name;
03   this.email = email;
04 }
05
06 const john = new Person('John', '[email protected]');
07 const jane = new Person('Jane', '[email protected]');
08 const emily = new Person('Emily', '[email protected]');
09 
10 let usersList = [john, jane, emily];


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?

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.

Question 2

Refer to the code below:

01 let timedFunction = () => {
02   console.log('Timer called.');
03 };
04
05 let timerId = setInterval(timedFunction, 1000);


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

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.

Question 3

A developer wants to use a module named universalContainersLib and then call functions from it.

How should a developer import every function from the module and then call the functions foo and bar?

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.

Question 4

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

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.

Question 5

Refer to the code below:

01 function execute() {
02  return new Promise((resolve, reject) => reject());
03 }
04 let promise = execute();
05
06 promise
07   .then(() => console.log('Resolved1'))
08   .then(() => console.log('Resolved2'))
09   .then(() => console.log('Resolved3'))
10   .catch(() => console.log('Rejected'))
11   .then(() => console.log('Resolved4'));


What is the result when the Promise in the execute function is rejected?

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.

Question 6

Refer to the code below:

01 const myFunction = arr => {
02   return arr.reduce((result, current) => {
03     return result + current; 
04   }, 10);
05 }


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

Select an answer above, then submit your vote. Reading or practicing does not cast a vote.