ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 70 - Certified JavaScript Developer I discussion

Report
Export

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{
Answers
A.
Class ClothingItem implements Item{
B.
Class ClothingItem {
Answers
B.
Class ClothingItem {
C.
Class ClothingItem super Item {
Answers
C.
Class ClothingItem super Item {
D.
Class ClothingItem extends Item {
Answers
D.
Class ClothingItem extends Item {
Suggested answer: D
asked 23/09/2024
benakli rabah
27 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first