Notifications
Clear all

Which line of code properly declares the clothingItem class such that it inherits from Item?

1 Posts
1 Users
0 Likes
123 Views
(@goyrocky)
Posts: 726
Noble Member
Topic starter
 

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?

  • A . Class ClothingItem implements Item{
    B. Class ClothingItem {
    C. Class ClothingItem super Item {
    D. Class ClothingItem extends Item {

Show Answer Hide Answer

Suggested Answer: D
 
Posted : 02/02/2023 4:38 pm

Latest Salesforce JavaScript Developer I Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: