Reputation: 1346
I am learning javascript and trying to understand what the below code does. Didnt understand why public object was created and then what does public.init do?
Entire code is located at http://jsfiddle.net/UqV4g/43/
var geoLocateAddress = function () {
var public = {};
public.init = function() {
public.initEventHandlers();
};
Upvotes: 0
Views: 62
Reputation: 1012
public is an object, and public.init = function...
this code creates new member in public
object, a function, so later you can use public.init();
to use that function.
Upvotes: 1