Let's study birds

Report a typo

You have a function constructor Bird:

function Bird(name, color, size) {
    this.name = name;
    this.color = color;
    this.size = size;
}

Call it to create the following objects:

{
    name: "Amazon parrot",
    color: "green",
    size: "medium"
}

{
    name: "Canary",
    color: "orange, red, yellow",
    size: "small"
}

Sample Input 1:

Sample Output 1:

Bird { name: 'Amazon parrot', color: 'green', size: 'medium' }
Bird { name: 'Canary', color: 'orange, red, yellow', size: 'small' }
Write a program in JavaScript
function Bird(name, color, size) {
this.name = name;
this.color = color;
this.size = size;
}

const amazonParrot;
const canary;
___

Create a free account to access the full topic