Cant access class object variable of javascript in IE and Mozilla
<p>I am having a class in javascript , in which i have defined few properties and methods and i have created an array and created and instance values of the class and pushed into it. After that i have iterated the array and checked a property from a particular method, but in IE and mozilla it is showing as undefined. I have given below the code for your details.</p>

<p>Class:</p>

<pre><code>function DateDetail(date, isBefore, isAfter, isNow) {
this.Date = date;
this.MonthNo = this.Date.getMonth();
this.DayNo = this.Date.getDate();
this.Year = this.Date.getFullYear();
this.IsAfter = isAfter;
this.IsBefore = isBefore;
this.IsNow = isNow;
this.GetMonthValue = function () {
    return this.Date.toString("MMM-yyyy");
    };
}
</code></pre>

<p>Method</p>

<pre><code>function GetTableDataClass(data) {
if (data.IsAfter)
    return "after";
else if (data.IsBefore)
    return "before";
else if (data.IsNow)
    return "now";
else
    return " ";
}
</code></pre>

<p>Calling method</p>

<pre><code>GetTableDataClass(item)
</code></pre>

<p>I am getting data is undefined in mozilla and IE. Please let me know any suggestions.</p>
