Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

JavaScript-Developer-I Practice Test


Page 8 out of 45 Pages

Refer to the code below:
console.log(‘’start);
Promise.resolve(‘Success’) .then(function(value){
console.log(‘Success’);
});
console.log(‘End’);
What is the output after the code executes successfully?


A.

End
Start
Success


B.

Start
Success
End


C.

Start
End
Success


D.

Success
Start
End





C.
  

Start
End
Success



Refer to the following array:
Let arr = [ 1,2, 3, 4, 5];
Which three options result in x evaluating as [3, 4, 5] ?
Choose 3 answers.


A.

Let x= arr.filter (( a) => (a<2));


B.

Let x= arr.splice(2,3);


C.

Let x= arr.slice(2);


D.

Let x= arr.filter((a) => ( return a>2 ));


E.

Let x = arr.slice(2,3);





B.
  

Let x= arr.splice(2,3);



C.
  

Let x= arr.slice(2);



D.
  

Let x= arr.filter((a) => ( return a>2 ));



Refer to the code below:
Const resolveAfterMilliseconds = (ms) => Promise.resolve (
setTimeout (( => console.log(ms), ms ));
Const aPromise = await resolveAfterMilliseconds(500);
Const bPromise = await resolveAfterMilliseconds(500);
Await aPromise, wait bPromise;
What is the result of running line 05?


A.

aPromise and bPromise run sequentially.


B.

Neither aPromise or bPromise runs.


C.

aPromise and bPromise run in parallel.


D.

Only aPromise runs.





B.
  

Neither aPromise or bPromise runs.



Refer to following code:
class Vehicle {
constructor(plate) {
This.plate =plate;
}
}
Class Truck extends Vehicle {
constructor(plate, weight) {
//Missing code
This.weight = weight;
}
displayWeight() {
console.log(‘The truck ${this.plate} has a weight of ${this.weight} lb.’);}}
Let myTruck = new Truck(‘123AB’, 5000);
myTruck.displayWeight();
Which statement should be added to line 09 for the code to display ‘The truck 123AB has a
weight of 5000lb.’?


A.

Super.plate =plate;


B.

super(plate);


C.

This.plate =plate;


D.

Vehicle.plate = plate;





B.
  

super(plate);



Which function should a developer use to repeatedly execute code at a fixed interval ?


A.

setIntervel


B.

setTimeout


C.

setPeriod


D.

setInteria





A.
  

setIntervel




Page 8 out of 45 Pages
Previous