Develop a function that takes specific input and generates an array of objects with a length of 10 by incrementing the ID of each duplicate object.
The first object in the output array should have "visible" set to true, while all others should have it set to false.
Input:
{
id: 0,
visible: true,
width: 200;
height: 200;
}
Output:
[
{
id: 0,
visible: true,
width: 200;
height: 200;
},
{
id: 1,
visible: false,
width: 200;
height: 200;
},
{
id: 2,
visible: false,
width: 200;
height: 200;
},
{
id: 3,
visible: false,
width: 200;
height: 200;
},
.
.
.
{
id: 9,
visible: false,
width: 200;
height: 200;
}
]