Im working with javascript and would like to know the number of objects inside of a constructor.
I have this:
var EventData = function(ID, Name, StartDate, StartTime, EndDate, EndTime, Location, Notes){
this.type = "event";
this.id = ID;
this.name = Name;
this.startDate = StartDate;
this.startTime = StartTime;
this.endDate = EndDate;
this.endTime = EndTime;
this.location = Location;
this.notes = Notes;
};
EventData.prototype.count = function(){
return //some code;
};
And i want to call something like this:
var Start = function(){
var thisEventData = new EventData(1,"Bill", 1,1,1,1, "Home", "N/A");
console.log(thisEventData.count());
};
Where thisEventData.count() would return 10.
Object.keys(obj).length.10, but why would it return10?