Just looking for clarification on what the scoping is for multiple files in adwords scripts
it seems that i can write a function and have it visible in other .gs files but variables are not
ex:
function main() {
foo()
}
function foo() {
Logger.log("hello world!");
}
// this will out put a statement into the log that says
hello world!
fine and dandy all is clear but what i'm unsure of is why this would not do the same
ex:
function main() {
foo()
}
var foo = function () {
Logger.log("hello world!");
}
// shouldnt this behave the same way?