scrimba
Основы JavaScript
Добавление свойств в constructor
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

Добавление свойств в constructor
AboutCommentsNotes
Добавление свойств в constructor
Expand for more info
pets.js
run
preview
console
const ernie = {
animal: 'dog',
age: '1',
breed: 'pug',
bark: function(){
console.log('Woof!');
}
}

const vera = {
animal: 'dog',
age: 8,
breed: 'Border Collie',
bark: function(){
console.log('Woof!');
}
}

const scofield = {
animal: 'dog',
age: 6,
breed: 'Doberman',
bark: function(){
console.log('Woof!');
}
}

const edel = {
animal: 'dog',
age: 7,
breed: 'German Shorthaired Pointer',
bark: function(){
console.log('Woof!');
}
}













Console
index.html
-1:36