ExamGecko
Ask Question

Salesforce Certified JavaScript Developer I Practice Test - Questions Answers, Page 11

Add to Whishlist

List of questions

Question 101

Report Export Collapse

developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript.

Which three benefits of Node.js can the developer use to persuade their manager?

Choose 3 answers:

Become a Premium Member for full access
  Unlock Premium Member

Question 102

Report Export Collapse

A developer is wondering whether to use, Promise.then or Promise.catch, especially when a Promise throws an error?

Which two promises are rejected?

Which 2 are correct?

Become a Premium Member for full access
  Unlock Premium Member

Question 103

Report Export Collapse

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?

Become a Premium Member for full access
  Unlock Premium Member

Question 104

Report Export Collapse

Universal Containers (UC) notices that its application that allows users to search for accounts makes a network request each time a key is pressed. This results in too many requests for the server to handle.

β€’ Address this problem, UC decides to implement a debounce function on string change handler.

What are three key steps to implement this debounce function?

Choose 3 answers:

Become a Premium Member for full access
  Unlock Premium Member

Question 105

Report Export Collapse

Refer to the following object:

const cat ={

firstName: 'Fancy',

lastName: ' Whiskers',

Get fullName() {

return this.firstName + ' ' + this.lastName;

}

};

How can a developer access the fullName property for cat?

Become a Premium Member for full access
  Unlock Premium Member

Question 106

Report Export Collapse

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.'?

Become a Premium Member for full access
  Unlock Premium Member

Question 107

Report Export Collapse

Which option is a core Node,js module?

Become a Premium Member for full access
  Unlock Premium Member

Question 108

Report Export Collapse

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 the array after the code executes?

Become a Premium Member for full access
  Unlock Premium Member

Question 109

Report Export Collapse

Which option is true about the strict mode in imported modules?

Become a Premium Member for full access
  Unlock Premium Member

Question 110

Report Export Collapse

Teams at Universal Containers (UC) work on multiple JavaScript projects at the same time.

UC is thinking about reusability and how each team can benefit from the work of others.

Going open-source or public is not an option at this time.

Which option is available to UC with npm?

Become a Premium Member for full access
  Unlock Premium Member
Total 224 questions
Go to page: of 23
Search

Related questions