# 변수

## 변수

### 변수의 선언&#x20;

```javascript
var a = 1; //변수 선
var b =2; 
var c = 'coding';
arlet (a+b); //3

var first = "coding";
alert(first+" everybody");// codingeverybody

```

* 변수(Variable)는 (문자나 숫자 같은) 값을 담는 컨테이너&#x20;
* 변수 담겨진 값은 다른 값으로 바꿀 수 있다.
* 변수는 숫자, 문자 모두 선언 가능하다.
* var로 선언 한 이후에는 var은 생략 가능하다.&#x20;

### 변수선언 이유&#x20;

```javascript
a = 100; // 변할 수 있는 코드 
a = a + 10; 
alert(a);
a = a / 10;
alert(a);
a = a - 10;
alert(a);
a = a * 10;      
alert(a);
```

* 재활용성이 있기때문에&#x20;
* 유지보수를 위해서&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://leeboa.gitbook.io/study/undefined-13/undefined-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
