I'm really sorry with the title, and im sorry if im asking this noob questions here, because i don't know what the keyword for this in google.
Ok, first i'm new to javascript and still learning this programming language. so i've seen this alot, but i don't know what it's mean
var myapp = function(){
  var a = 'a';
  var b = function(){
    //some code goes here
  }
  return {
    init: function(){
    b();
    //some code goes here
    }
  }
}() <-- what is it?;
So i've been wondering what this symbol '()' do at the end. and why many people writing a function inside a variable?
 
    