Free CRT-600 Exam Braindumps
Prepare for your JavaScript Developer I Certification Exam Questions 51–55 (page: 12)

Updated On: 10-Feb-2026

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) {
...//Constructor Implementation
}
}
There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.
Let regItem =new Item(`Scarf', 55);
Let saleItem = new SaleItem(`Shirt' 80, -1);
Item.prototype.description = function () { return `This is a ' + this.name; console.log(regItem.description());
console.log(saleItem.description());
SaleItem.prototype.description = function () { return `This is a discounted ' + this.name; }
console.log(regItem.description());
console.log(saleItem.description());
What is the output when executing the code above ?

  1. This is a Scarf
    Uncaught TypeError: saleItem.description is not a function This is aScarf
    This is a discounted Shirt
  2. This is a Scarf
    This is a Shirt
    This is a Scarf
    This is a discounted Shirt
  3. This is a Scarf
    This is a Shirt
    This is a discounted Scarf
    This is a discounted Shirt
  4. This is aScarf
    Uncaught TypeError: saleItem.description is not a function This is a Shirt
    This is a did counted Shirt

Answer(s): B



Given the following code:
Let x =(`15' + 10)*2;
What is the value of a?

  1. 3020
  2. 1520
  3. 50
  4. 35

Answer(s): A



Refer to the following code:
01 function Tiger(){
02 this.Type = `Cat';
03 this.size = `large';
04 }
06 let tony = new Tiger();
07 tony.roar = () =>{
08 console.log(`They\'re great1');
09 };
11 function Lion(){
12 this.type = `Cat';
13 this.size = `large';
14 }
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.

  1. Leo.roar = () => { console.log(`They\'re pretty good:'); };
  2. Object.assign(leo,Tiger);
  3. Object.assign(leo,tony);
  4. Leo.prototype.roar = () => { console.log(`They\'re pretty good:'); };

Answer(s): A,C



Which statement accurately describes an aspect of promises?

  1. Arguments for the callback function passed to .then() are optional.
  2. In a.then() function, returning results is not necessary since callbacks will catch the result of a previous promise.
  3. .then() cannot be added after a catch.
  4. .then() manipulates and returns the original promise.

Answer(s): A



Given the code below:
Function myFunction(){
A =5;
Var b =1;
}
myFunction();
console.log(a);
console.log(b);
What is the expected output?

  1. Both lines 08 and 09 are executed, and the variables are outputted.
  2. Line 08 outputs the variable, but line 09 throws an error.
  3. Line 08 thrones an error, therefore line 09 is never executed.
  4. Both lines 08 and 09 are executed, but values outputted are undefined.

Answer(s): B



Viewing page 12 of 46
Viewing questions 56 - 60 out of 224 questions


Post your Comments and Discuss Salesforce CRT-600 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!