Pass JavaScript-Developer-I Brain Dump Updated Certification Sample Questions [Q64-Q84]

4.3/5 - (9 votes)

Pass JavaScript-Developer-I Brain Dump Updated Certification Sample Questions

Online JavaScript-Developer-I Test Brain Dump Question and Test Engine

Q64. 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.’?

 
 
 
 

Q65. Refer to the code below?
Let searchString = ‘ look for this ‘;
Which two options remove the whitespace from the beginning of searchString?
Choose 2 answers

 
 
 
 

Q66. Refer to the HTML below:

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

 
 
 
 

Q67. A developer is leading the creating of a new browser application that will server a single page application. The team wants to use a new web framework Minialist.js. The lead developer wants to advocate for a more seasoned wen framework that already has a community around it.
Which two frameworks should the load developer advocate for?

 
 
 
 

Q68. Given the code below:
const delay = sync delay => {
Return new Promise((resolve, reject) => {
setTimeout (resolve, delay);});};
const callDelay =async () =>{
const yup =await delay(1000);
console.log(1);
What is logged to the console?

 
 
 
 

Q69. A developer has a web server running with Node.js. The command to start the web server is node server.js.
The web server started having
latency issues. Instead of a one second turnaround for web requests, the developer now sees a five second turnaround.
Which command can the web developer run to see what the module is doing during the latency period?

 
 
 
 

Q70. Refer to the code below:
let sayHello = () => {
console.log (‘Hello, world!’);
};
Which code executes sayHello once, two minutes from now?

 
 
 
 

Q71. Refer to the code below:

What is the result of running line 05?

 
 
 
 

Q72. A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript.
The website includes multiple external resources that are loaded when the page is opened.
To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is loaded and there is no need to wait for the resources to be available.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?

 
 
 
 

Q73. A developer wants to use a try…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?

 
 
 
 

Q74. 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, json definition below.

A developer runs this command: npm install.
Which version of bar .awesome is installed?

 
 
 
 

Q75. Refer to the code below:

Line 05 causes an error.
What are the values of greeting and salutation once code completes?

 
 
 
 

Q76. A test has a dependency on database.query. During the test the dependency is replaced with an object called database with the method, query, that returns an array. The developer needs to verify how many times the method was called and the arguments used each time.
Which two test approaches describe the requirement?
Choose 2 answers

 
 
 
 

Q77. developer publishes a new version of a package with new features that do not break backward compatibility. The previous version number was 1.1.3.
Following semantic versioning format, what should the new package version number be?

 
 
 
 

Q78. Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i < array.length; i++)
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of array after the code executes?

 
 
 
 

Q79. Given the code below:

What is logged to the console’

 
 
 
 

Q80. Cloud Kicks has a classto 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?

 
 
 
 

Q81. Refer to the string below.
Const str=’Salesforce’;
Which two statements results in the word ‘Sales’?

Q82. A developer wrote the following code:
01 let X = object.value;
02
03 try {
04handleObjectValue(X);
05 } catch (error) {
06 handleError(error);
07 }
Thedeveloper has a getNextValue function to execute after handleObjectValue(), but does not want to execute getNextValue() if an error occurs.
How can the developer change the code to ensure this behavior?

 
 
 
 

Q83. Refer to the code below:
let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,”Car1 crashed in”)); let car2 = new Promise(resolve => setTimeout(resolve,1500,”Car2 completed”)); let car3 = new Promise(resolve => setTimeout(resolve,3000,”Car3 completed”)); Promise.race([car1,car2,car3])
.then(value=>{
let result = `${value} the race.`;
}).catch(err=>{
console.log(‘Race is cancelled.’,err);
});
What is the value of result when promise.race execues?

Q84. Which statement accurately describes an aspect of promises?

 
 
 
 

Real Salesforce JavaScript-Developer-I Exam Dumps with Correct 223 Questions and Answers: https://www.practicematerial.com/JavaScript-Developer-I-exam-materials.html

Related Links: www.stes.tyc.edu.tw myportal.utt.edu.tt myportal.utt.edu.tt www.stes.tyc.edu.tw www.stes.tyc.edu.tw myportal.utt.edu.tt

Leave a Reply

Your email address will not be published. Required fields are marked *

Enter the text from the image below