Could you please explain whats the mean of
first[dot]second like declaration in javascript rules
first.second = (function () {
//...
})();
it means first
is an object and second
is a property of that object.
it can be defined as follows too;
var first = {};// {} -is JS object notation
first.second = function(){
alert('test');
};
//or
var first = {
second : function(){
alert('test');
}
};
//invoke the function
first.second();// prompt alert message