-
-
Save chubas/3687b09f40b6a1194999 to your computer and use it in GitHub Desktop.
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 x = "some initial value" | |
some_var = (function { | |
var x = 10; // We can declare a local variable 'x' here. In Ruby you can't | |
return x + 2; | |
})(); | |
x // => Still "some initial value" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment