The object
cat
combines attributes and behaviors of a cat in the following object
let cat = {
    age: 4,
    name: 'Bella',
    meow() {
        console.log('Meowwww');
    }
}
Instead of the object, we would have separated function and variables, which is not organized way
let catName = 'Bella';
let catAge = 4;

function meow() {
    console.log('Meowwww');
}
by Valeri Tandilashvili
4 years ago
JavaScript
objects
The 10 Days of JavaScript
2
Pro tip: use ```triple backticks around text``` to write in code fences