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 A and Option B?
A. 1000 for Option A, 1 for Option B
B. 1 methods for both
C. 1000 for both
D. 1 for Option A, 1000 for Option B
Refer to the code declarations below:
Whichthree expressions return the string JavaScript? Choose 3 answers
A. Str1.join (str2);
B. Str1.concat (str2);
C. Concat (str1, str2);
D. $(str1) $ (str2} `;
E. Str1 + str2;
Refer to the code below
let inArray = [[1,2],[3,4,5]];
which two statements results in the array [1,2,3,4,5]?
choose 2 answer
A. [ ].concat(...inArray);
B. [ ].concat.apply(inArray,[ ]);
C. [ ].concat([...inArray])
D. [ ].concat.apply([ ],inArray);
Refer to code below:
function Person() {
this.firstName = 'John';
}
Person.prototype ={
Job: x => `Developer'
};
const myFather = new Person();
const result=myFather.firstName + ` ` + myFather.job();
What is the value of the result after line 10 executes?
A. Error: myFather.job is not a function
B. Undefined Developer
C. John undefined
D. John Developer
Given the HTML below:
Which statement adds the priority-account CSS class to the Universal Containers row?
A. document. querySelector (#row-uc').classes-push('priority-account');
B. document. getElementByid('row-uc').addClass('priority-account*);
C. document. querySelectorAll('#row-uc') -classList.add("priority-accour');
D. document. queryselector('#row-uc').ClassList.add('priority-account');
Refer to the code below:
01 let car1 = new promise((_, reject) =>
02 setTimeout(reject, 2000, "Car 1 crashed in"));
03 let car2 = new Promise(resolve => setTimeout(resolve, 1500, "Car 2
completed"));
04 let car3 = new Promise(resolve => setTimeout (resolve, 3000, "Car 3
Completed"));
05 Promise.race([car1, car2, car3])
06 .then(value => (
07 let result = $(value) the race. `;
08 ))
09 .catch( arr => (
10 console.log("Race is cancelled.", err);
11 ));
What is the value of result when Promise.race executes?
A. Car 3 completed the race.
B. Car 1 crashed in the race.
C. Car 2 completed the race.
D. Race is cancelled.
Refer to the following array:
Let arr1 =[ 1, 2, 3, 4, 5 ]; Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?
A. Let arr2 = arr1.slice(0, 5);
B. Let arr2 = Array.from(arr1);
C. Let arr2 = arr1;
D. Let arr2 = arr1.sort();
A developer wants to use atry...catch statement to catch any error that countSheep () may throw and pass it to a handleError () function. What is the correct implementation of the try...catch?
A. Option A
B. Option B
C. Option C
D. Option D
Refer to the code below:
Whatis the value of result after line 10 executes?
A. Error: myFather.job is not a function
B. John Developer
C. undefined Developer
D. John undefined
bar, awesome is a popular JavaScript module. the versions publish to npm are:
Teams at Universal Containers use this module in a number of projects. A particular project has the package, jsondefinition below.
A developer runs this command: npm install. Which version of bar .awesome is installed?
A. 1.3.1
B. 1.3.5
C. The command fails, because version 130 is not found
D. 1.4.0
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Salesforce exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your JAVASCRIPT-DEVELOPER-I exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.