mrkiyak mrkiyak - 1 year ago 87
Javascript Question

using dot notation with more than one in javascript syntax

Could you please explain whats the mean of

first[dot]second like declaration in javascript rules

first.second = (function () {

Answer Source

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(){

var first = {
  second : function(){

//invoke the function
first.second();// prompt alert message

simple documentation

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download