ExamGecko
Ask Question

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

Add to Whishlist

List of questions

Question 51

Report Export Collapse

A class was written to represent items for purchase in an online store, and a second class Representing items that are on sale at a discounted price. THe constructor sets the name to the first value passed in. The pseudocode is below:

Class Item { constructor(name, price) { … // Constructor Implementation

}} Class SaleItem extends Item { constructor (name, price, discount) {

Become a Premium Member for full access
  Unlock Premium Member

Question 52

Report Export Collapse

Given the following code:

Let x =('15' + 10)*2;

What is the value of a?

Become a Premium Member for full access
  Unlock Premium Member

Question 53

Report Export Collapse

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 = () =>{

08 console.log('They\'re great1');

09 };

10

11 function Lion(){

12 this.type = 'Cat';

13 this.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.

Become a Premium Member for full access
  Unlock Premium Member

Question 54

Report Export Collapse

Which statement accurately describes an aspect of promises?

Become a Premium Member for full access
  Unlock Premium Member

Question 55

Report Export Collapse

Given the code below:

Function myFunction(){

A =5;

Var b =1;

} myFunction();

console.log(a);

console.log(b);

What is the expected output?

Become a Premium Member for full access
  Unlock Premium Member

Question 56

Report Export Collapse

Which two console logs outputs NaN ?

Choose 2 answers

Become a Premium Member for full access
  Unlock Premium Member

Question 57

Report Export Collapse

Given the following code:

Counter = 0;

const logCounter = () => {

console.log(counter);

);

logCounter();

setTimeout(logCOunter, 1100);

setInterval(() => {

Counter++

logCounter();

}, 1000);

What is logged by the first four log statements?

Become a Premium Member for full access
  Unlock Premium Member

Question 58

Report Export Collapse

Refer to the code below:

Refer to the code below:

Function Person(firstName, lastName, eyecolor) {

this.firstName =firstName;

this.lastName = lastName;

this.eyeColor = eyeColor;

}

Person.job = 'Developer';

const myFather = new Person('John', 'Doe');

console.log(myFather.job);

What is the output after the code executes?

Become a Premium Member for full access
  Unlock Premium Member

Question 59

Report Export Collapse

A developer at Universal Containers creates a new landing page based on HTML, CSS, and JavaScript TO ensure that visitors have a good experience, a script named personaliseContext needs to be executed when the webpage is fully loaded (HTML content and all related files ), in order to do some custom initialization.

Which statement should be used to call personalizeWebsiteContent based on the above business requirement?

Become a Premium Member for full access
  Unlock Premium Member

Question 60

Report Export Collapse

A developer is leading the creation of a new browser application that will serve a single page application. The team wants to use a new web framework Minimalsit.js. The Lead developer wants to advocate for a more seasoned web framework that already has a community around it.

Which two frameworks should the lead developer advocate for?

Choose 2 answers

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

Related questions