Skip to content

Commit

Permalink
añado método para obtener información sobre una marca #43
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelfdez99 committed Dec 27, 2020
1 parent 98bebf3 commit ad6e8bc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/myoutlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,22 @@ showItems(){
}
}


//Method to show information about certain brand
brandInfo(b) {
let brand = ""
for(var i in this.items){
if (this.items[i].getBrand() == b){
brand += "Type:" + this.items[i].getType() + ", " +
"Size: " + this.items[i].getSize() + ", " +
"Color: " + this.items[i].getColor() + ", " +
"Price: " + this.items[i].getPrice() + ", " +
"Season: " + this.items[i].getSeason() + " ";
}
}
return brand;
}

}

module.exports = MyOutlet;

0 comments on commit ad6e8bc

Please sign in to comment.