scrimba
Основы JavaScript
Добавление методов в класс
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Добавление методов в класс
AboutCommentsNotes
Добавление методов в класс
Expand for more info
index.js
run
preview
console
class Pet {
constructor(animal, age, breed) {
this.animal = animal;
this.age = age;
this.breed = breed
}
}

const ernie = new Pet('dog', 1, 'pug');
const vera = new Pet('dog', 8, 'Border Collie');
const scofield = new Pet('dog', 6, 'Doberman');
Console
index.html
-2:09