# arguments 함수

## arguments

> function 함수명(){\
> &#x20;   arguments;\
> }\
> 함수명(매개변수1, 매개변수2, 매개변수3);

### 샘플1

```javascript
function sum(){
let sum =arguments[0]+arguments[1]+arguments[2]
document.write(sum)
}
sum(100,200,300);
```

### 샘플2

```javascript
function sum(){
    var sum = 0;
    for (var i =0; i < arguments.length; i++){
    sum+= arguments[i];
    }
    
    document.write(sum);
}

sum(10, 20, 30);
```
