Functions in JS

what is the difference b/w returning a function and returning an object of same name