This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var 로 내부 변수를 선언해야합니다. | |
(function() { | |
var foo = 'Hello, world!'; | |
print(foo); //=> Hello, world! | |
})(); | |
// 그렇지 않으면 전역변수로 선언됩니다. | |
(function() { | |
foo = 'Hello, world!'; | |
print(foo) //=> Hello, world! |