> For the complete documentation index, see [llms.txt](https://heunnajo.gitbook.io/zerocho-javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heunnajo.gitbook.io/zerocho-javascript/array-and-fill.md).

# 로또추점기 Array & fill

Array(숫자)로 빈 배열을 만들 수 있다.

empty의 특징은 forEach 와 같은 반복문을 사용할 수 없다.&#x20;

fill 메소드는 IE에서는 지원되지 않는다.

```javascript
var 후보군 = Array(45);
var 필  = 후보군.fill();//undefined로 채워진 배열이 된다.

var 후보군 = Array(45);
var 필  = 후보군.fill();//undefined로 채워진 배열이 된다.

필.map(function(요소,인덱스){
    필[인덱스] = 인덱스+1;//undefined 0 undefined 1 undefined 2 ... undefined 45
});

```
