View all detail and faqs for the JavaScript-Developer-I exam
Considering the implications of 'use strict' on line 04, which three statements describe the execution of the code?
Choose 3 answers
Cloud Kicks has a class to represent items for sale in an online store, as shown below:
Class Item{
constructor (name, price){
this.name = name;
this.price = price;
}
formattedPrice(){
return ‘s’ + String(this.price);}}
A new business requirement comes in that requests a ClothingItem class that should have all of
the properties and methods of the Item class but will also have properties that are specific to
clothes.
Which line of code properly declares the clothingItem class such that it inherits from
Item?
A developer has an ErrorHandler module that contains multiple functions.
What kind of export be leverages so that multiple functions can beused?
After user acceptance testing, thedeveloper is asked to change the webpage background based on user's location. This change was implemented and deployed for testing.
The tester reports that the background is not changing, however it works as required when viewing on the developer's computer.
Which two actions will help determine accurate results?
Choose 2 answers
Refer to the following code:
01 function Tiger(){
02this.Type = ‘Cat’;
03 this.size = ‘large’;
04 }
05
06 let tony = new Tiger();
07 tony.roar = () =>{
08 console.log(‘They\’regreat1’);
09 };
10
11 function Lion(){
12 this.type = ‘Cat’;
13 this.size = ‘large’;
14 }
15
16 let leo = new Lion();
17 //Insertcode here
18 leo.roar();
Which two statements could be inserted at line 17 to enable the function call on line 18?
Choose 2 answers.
Given the JavaScript below:

Which code should replace the placeholder comment on line 06 to hide accounts that do not match the search string?
A developer has two ways to write a function:
Option A:
function Monster(){
this.growl = ()=>{
console.log('Grr!');
}
}
Option B:
function Monster(){};
Monster.prototype.growl = ()=>{
console.log('Grr!');
}
After deciding on an option, the developercreates 1000 monster objects.
How many growl methods are created with Option Aand Option B?
Refer to the HTML below:

Which JavaScript statement results in changing “ The Lion.”?
A developer wants to create an object from afunction in the browser using the code
below:
Function Monster() { this.name = ‘hello’ };
Const z = Monster();
What happens due to lackof the new keyword on line 02?
Refer to the following code:
function test (val) {
If (val === undefined) {
return ‘Undefined values!’ ;
}
if (val === null) {
return ‘Null value!’;
}
return val;
}
Let x;
test(x);
What is returned by the function call on line 13?