| 1 | |
| 2 | class Pessoa { |
| 3 | nome; |
| 4 | idade; |
| 5 | anoDeNascimento; |
| 6 | |
| 7 | constructor(nome, idade) { |
| 8 | this.nome = nome; |
| 9 | this.idade = idade; |
| 10 | this.anoDeNascimento = 2022 - idade; |
| 11 | } |
| 12 | |
| 13 | descrever() { |
| 14 | console.log(`Meu nome é ${this.nome} e minha idade é ${this.idade}`); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | function compararPessoas(p1, p2) { |
| 19 | if (p1.idade > p2.idade) { |
nothing calls this directly
no outgoing calls
no test coverage detected