Question 31

Refer to the following code: 01 function Tiger(){
02 this.Type = ‘Cat’; 03 this.size = ‘large’; 04 }
05
06 let tony = new Tiger(); 07 tony.roar = () =>{
8 console.log(‘They’re great1’);
9 };
10
11 function Lion(){ 12 this.type = ‘Cat’; 13this.size = ‘large’; 14 }
15
16 let leo = new Lion(); 17 //Insert code here
18 leo.roar();
Which two statements could be inserted at line 17 to enable the function call on line 18? Choose 2 answers.

Correct Answer:AC

Question 32

Given the following code: Let x =(‘15’ + 10)*2;
What is the value of a?

Correct Answer:A

Question 33

At Universal Containers, every team has its own way of copyingJavaScript objects. The code
Snippet shows an implementation from one team:
JavaScript-Developer-I dumps exhibit
What is the Output of the code execution?

Correct Answer:C

Question 34

Refer to the following array:
Let arr1 = [ 1, 2, 3, 4, 5 ];
JavaScript-Developer-I dumps exhibit
Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?

Correct Answer:AB

Question 35

A developer has code that calculates a restaurant bill, but generates incorrectanswers while testing the code:
function calculateBill ( items ) { let total = 0;
total += findSubTotal(items); total += addTax(total);
total += addTip(total); return total;
}
Which option allows the developer to step into each function execution within calculateBill?

Correct Answer:A

Question 36

Refer to HTML below:


This card is smaller.

The width and height of this card is determined by its contents.


Which expression outputs the screen width of the element with the ID card-01?

Correct Answer:A

START JavaScript-Developer-I EXAM