Last active
July 18, 2020 14:11
-
-
Save egeysn/b6be2e02528acfdaa6cf790dfcc03635 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
fun outerFunction(nice: String) { | |
val hello = "Hello, Medium" | |
fun innerFunction(awesome: String) { | |
println(awesome) | |
//Bu kısımdan outerFunction'un "nice" değişkenine erişebiliriz. | |
println(nice) | |
// Ayrıca bu kısımdan outerFunction'a ait olan "hello" değişkenine erişim sağlayabiliriz. | |
println(hello) | |
} | |
// outerFunction içerisinde innerFunction çağrılıyor. | |
innerFunction(" I'm innerFunction") | |
} | |
fun main(args: Array<String>) { | |
// outerFunction'a erişim sağlayabiliriz fakat outerFunction içinde ki | |
//innterFunction'a erişim sağlayamayız. | |
outerFunction("I'm calling outerFunction in main()") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment