Semana 4 - Exercício Classes - Priscila Vieira#27
Open
Prissie wants to merge 2 commits into
Open
Conversation
NicoleSF
reviewed
Jul 21, 2023
| } | ||
| } | ||
|
|
||
| class Domesticado extends Animal{ |
There was a problem hiding this comment.
Aaaah legal! Tu separou por classes os domésticos! Eu não fiz isso no meu, mas achei uma ótima ideia!
NicoleSF
reviewed
Jul 21, 2023
|
|
||
| vacinar(vacina){ | ||
| this.vacinas.push(vacina) | ||
| super.consultar() |
There was a problem hiding this comment.
Show que usou o super! No meu eu não usei, mas acho que o teu jeito faz mais sentido. O meu eu chamei consultar numa classe Animal, depois nas classes Cachorro, Gato etc eu chamei no construtor o this.consultas e nos métodos eu coloquei this.consultar(), não coloquei o super, mas vou fazer assim da próxima vez!
NicoleSF
reviewed
Jul 21, 2023
| alimentar(comida){ | ||
| const comidasFavoritas = ["frango","sachê","peixe"] | ||
|
|
||
| if(comidasFavoritas.includes(comida)){ |
There was a problem hiding this comment.
perfeito o includes, eu achei que conseguiria usar no meu, mas não teve jeito. Olhando o teu código, agora entendi!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.