Scope in Groovy
c = 1
def set() {
c = 2
return c
}
println c
println set()
println c
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
c = 1
def set() {
c = 2
return c
}
println c
println set()
println c