all i have seen creating objects like below, what is this type creating object actually?

```
var myApp = myApp || {};

```

I'm creating object like this

```
var myApp={property:"value",method:function(){}};

```

Can anybody please tell me the difference between both type.