call another function from annonymous function
(function( $, window, document ){
var foo = 'Hello';
var bar = 'World!'
function baz(){
return foo + ' ' + bar;
}
window.baz = baz; //Assign 'baz' to the global variable 'baz'...
})(jQuery, window, document);
function r(){
console.log(baz());
};
r();