Q:

Javascript function literals?

I have stumbled upon this code
var Actors = {

    init: function(config){
        this.config = config;
        this.bindEvents();
    },

    bindEvents: function(){
        this.config.letterSelection.on('change',this.fetchActors );
    },

    fetchActors: function(){
        console.log('fetching');
    }
};

And at first I was thinking what kind of Javascript is this. I don't know what to search for. so I guess asking it here is approrpriate
What I understand is that var Actors is an object.
but what about these?
 init: function(config){
        this.config = config;
        this.bindEvents();
    },

What do you specifically call the literal "init" ? is it called an object literal? after the init it has a function attached to it what do you call it?
I understand what the code is doing. but I don't know what to call them in technical terms.
so what type of javascript is this? why does a word "init" has a function to it

A:

What do you specifically call the literal "init" ? is it called an object literal? 

A property. The object literal is {}

after the init it has a function attached to it what do you call it?

A method.

why does a word "init" has a function to it

Because it is useful to organise a bunch of related "stuff" by assigning the them to object properties.
It becomes more so when functions can use this to operate on the object they are associated with.

A:

JavaScript is kinda functional language, which means that functions are first-class objects in it. So if you have a variable, then you can assign to it some string, some number, some object or some function, like this:
var a;
a = function() {};
a(); // Call this function

In the same way you can assign a function to an object property, like this:
var a = {};
a.myProp = function() {};
a.myProp(); // Call this function

But when you call your function like a.myProp(), then this function also receives a special argument called this which points to a.
So, in your case Actors is assigned object literal, which has a property init, which is assigned a function. You can call it method, but this is a concept from other OO languages. Here, it's just a property which is assigned a function.

