PDA

View Full Version : why we use "Object Literal Notation" way to create own objects ?



accacc
17 Apr 2011, 6:10 AM
i am new,but i like below notation,why we use that Literal Notation?

<script>
Ext.onReady(function () {

var win = new Ext.Window();
win.width = 400;
win.id = 'autoload-win';
win.height = 300;
win.autoScroll = true;
win.show();

});
</script>

mitchellsimoens
17 Apr 2011, 2:16 PM
That's ugly... Looks a lot better if you use a confit Object. Also goes in the prototype.