MCPcopy Create free account
hub / github.com/digitalinnovationone/javascript-developer-m1 / constructor

Method constructor

05 - objetos/aula.js:7–11  ·  view source on GitHub ↗
(nome, idade)

Source from the content-addressed store, hash-verified

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}`);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected