15.5 Local Functions
A local function is a function that is embedded within another function. In addition, a local function has access to all of the variables contained within the enclosing function:
fun main(args: Array<String>) {
val name = "John"
val count = 5
fun displayString() {
for (index in 0..count) {
println(name)
}
}
displayString()
}