Global variables
suggest changevar="hello"
function foo(){
echo $var
}
foo
Will obviously output “hello”, but this works the other way around too:
function foo() {
var="hello"
}
foo
echo $var
Will also output “hello”
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents