I want to create such array in loop

```
dataset: [
{
x: 0,
y: 0,
},
{
x: 1,
y: 0.993,
}
]

```

But this way is not correct.

```
var array =  new Array(10);
                   for (var i = 0; i < 5; ++i) {
                        array[i].x = 1;
                        array[i].y = 2;
                    }

```

How I can initialize in correct way?