Nested Object Literal and Making Function as Object
It is a simple task to define an Object Literal. For example:
var myObject = {
property: "Foo: Bar",
oFnc: function(){
document.writeln("Hello World!");
}
};
As you can see, myObject is now playing as an object. To check on it, just run this line of code:
alert("myObject is: " + typeof [...]
