Reputation: 1606
I have around 50 objects like:
object[0].one = something;
object[0].two = else;
object[0].options = whatever;
Not sure how to describe it but they each have sub parameters. I was trying to add an additional parameter that I would add manually only to those I wanted too, like so:
object[15].condition = function() { if (something) { then do something; } } ;
//and then later on in a function do
if (this.condition) {
this.condition;
}
but I can't get it to work =( Is something like this possible? Any help is greatly appreciated.
Upvotes: 0
Views: 42