WON.dev
chapter03 : 선언적함수 본문
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
/*
선언적 함수
```
-동일한 함수를 두 개 이상 만들면 덮어쓰기해서 나중에 만든 함수를 사용
* 자바의 오버로드 불가(매개변수가 달라도 같은 함수로 인식)
*/
function view(){
document.write("<h1>첫 번째 view</h1>")
}
function view(){
document.write("<h1>두 번째 view</h1>")
}
view();
```
</script>
</head>
<body>
</body>
</html>
'WEB.JS > 04.함수_JS' 카테고리의 다른 글
chapter06 : 함수사용예제 (0) | 2023.05.19 |
---|---|
chapter05 : 선언적함수_표현적함수 (0) | 2023.05.19 |
chapter04 : 표현적함수 (0) | 2023.05.19 |
chapter02 : 선언적함수 (0) | 2023.05.19 |
chapter01 : 선언적함수 (0) | 2023.05.19 |