Question 21

Cloud Kicks has a class to 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?
  • Question 22

    Refer to the code below:

    What value can a developer expect when referencing o,js,secondCity?
  • Question 23

    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:

    There is a new requirement for a developer to implement a description method that will retrun a brief description for item and saleitem.

    What is the out when executing the code above?
  • Question 24

    Given the code below:

    What is logged to the console'
  • Question 25

    Refer to the code below:

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