<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Object basics: Task 3</title>
<link rel="stylesheet" href="../styles.css" />
</head>
<body>
<section class="preview">
</section>
</body>
</html>
p {
color: purple;
margin: 0.5em 0;
}
* {
box-sizing: border-box;
}
const cat = {
name: 'Bertie',
breed: 'Cymric',
color: 'white',
greeting: function(){
console.log(`Hello, said ${this.name} the ${this.breed}`);
}
};
const cat2 = {
name: 'Freddy',
breed: 'Siberian',
color: 'gray',
greeting: function(){
console.log(`Hello, said ${this.name} the ${this.breed}`);
}
};
cat.greeting();
cat2.greeting();
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.