Skip to content

Instantly share code, notes, and snippets.

@haerang94
Last active November 29, 2019 18:21
Show Gist options
  • Save haerang94/0b99d1fa9c30abe52738f4da3c98f29b to your computer and use it in GitHub Desktop.
Save haerang94/0b99d1fa9c30abe52738f4da3c98f29b to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/keruhiz
//이름 있는 함수를 만드는 방법
function testA(){
console.log("A");
console.log("A");
console.log("A");
}
//선언적 함수
//이름 없는 함수를 만드는 방법
var testB=function (){
console.log("B");
}
//익명함수
// 함수
//함수 리터럴, 호출할 수 없어서 이름 변수를 통해 호출
console.log(testA);
console.log(testB);
//testA();
//testB();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
//이름 있는 함수를 만드는 방법
function testA(){
console.log("A");
console.log("A");
console.log("A");
}
//선언적 함수
//이름 없는 함수를 만드는 방법
var testB=function (){
console.log("B");
}
//익명함수
// 함수
//함수 리터럴, 호출할 수 없어서 이름 변수를 통해 호출
console.log(testA);
console.log(testB);
//testA();
//testB();
</script>
<script id="jsbin-source-javascript" type="text/javascript">//이름 있는 함수를 만드는 방법
function testA(){
console.log("A");
console.log("A");
console.log("A");
}
//선언적 함수
//이름 없는 함수를 만드는 방법
var testB=function (){
console.log("B");
}
//익명함수
// 함수
//함수 리터럴, 호출할 수 없어서 이름 변수를 통해 호출
console.log(testA);
console.log(testB);
//testA();
//testB();</script></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment