Question: I have been using/calling functions from objects like this:

```
var object = { 
    fn: function(){ 
        alert('i can see it!'); 
    }
}; 
object.fn(); // it works

```

but I don't know how to call function from mere `{}` object. 

```
{
    fn: function() {
        alert('i can\'t see it');
    }
}

fn(); // wont work ?

```

I want to know why this is not working? Is there a way to make it work?

Answer: 
Your second example is invalid syntax. The `{}` is interpreted as a block statement with a label and an invalid function because it has no name.

If you wanted to do it inline like that, you'd need something more like this:

```
({
    fn: function() {
        alert('now i can see it');
    }
}).fn();

```

Now you're creating an object since the `{}` can no longer be a block statement, but is instead object literal syntax. Then you're immediately accessing the `fn` property you defined.

Of course there's little point to this, but it's closer to what you were doing.
Here is the proper syntax to define a "standalone" function (with no wrapper object) :

```
var fn = function () { ... };
function fn() { ... };

```