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

# 자바스크립트 기초 문법

### 자바스크립트 출력 방법

```javascript
//웹 문서에 출력하기
document.write("javascript");

//콘솔(브라우저) 로그를 이용하는 방법
console.log("javascript");

//경고창을 이용하는 방법
alert("javascript");

//innerHTML을 이용하는 방법
document.getElementById("id").innerHTML ="javascript"
```

```javascript
//변수(str)를 선언해서 javascript 문자열을 입력하고 경고창으로 출력하세요!

let str = "javascript";

//함수 선언
function func(){
    let num = 1000;
    alert(num);
    document.write(str);
}
func();
alert(str);

```
