Demo entry 6695194

1

   

Submitted by anonymous on Jan 23, 2018 at 07:21
Language: JavaScript. Code size: 401 Bytes.

<html>
<head>
<title></title>
</head>

<script language="javascript">

//var 타입
var name = "김원준";
function Name()
{//var 타입은 function을 기준으로 스코프
	var name = "김현준";
	document.write(name);
}
Name();
document.write(name);

//let 타입
let name2 = "김원준";
{//let 타입은 블록을 기준으로 스코프
	let name2 = "김현준";
	document.write(name2);
}
document.write(name2);
</script>
<body>

</body>
</html>

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).