getAll() executes the function then .apply is used on what that function returns, since getAll isn’t returning anything it is undefined.
getLocation is in the scope of getAll and can be called inside of it, however getLocation is not accessible outside of getAll.
foo() // bar
bar() // Reference Error bar is not defined
When using call, bind, apply use fn.bind() , fn.call(), fn.apply(), where fn is the function name.