Array length is 7

Original array

```
var arr = [2, 4, 6];

```

Needed array

```
arr = [null,null,2,null,4,null,6];

```

* 0 is not present in array so need to replace with null,
* 1 is not available replace with null and
* 2 is available so put 2 in new array so on..