This is the example code.

```
window.onload = function() {
    var i, arr = [], result = [];

    arr.push(1);
    arr.push(2);
    arr.push(3);

    for ( i = 0; i < 20; i++ ) {
        arr.push(5);
        arr.push(6);

        result.push(arr);
        arr.length = 3;
    }

    console.log(result);
}

```

Output:

```none
 Array[20] 

 0: Array[3] 

 1: Array[3] 

 2: Array[3]

 etc...

```