C
CBlair1986
Hey all. I did a quick look-see, and I can't tell if there's a quicker
way to do what I want to do.
I'm using prototype.js, so if this is the wrong place to ask, sorry,
but I think it's just a really quick question.
In my script, I'm making something like:
var Foo = Class.create()
Foo.prototype = {
initialize: function( one, two, three, four, ..., twenty-seventh ) {
this.one = one;
this.two = two;
...
this.twenty-seventh = twenty-seventh;
}
}
Now, I'm going to do this a lot (approximately thirty or forty times),
so I was wondering if there was a way to use the arguments array and a
little bit of evaluation tomfoolery to make it a bit more compact.
Thanks for any insights you give!
way to do what I want to do.
I'm using prototype.js, so if this is the wrong place to ask, sorry,
but I think it's just a really quick question.
In my script, I'm making something like:
var Foo = Class.create()
Foo.prototype = {
initialize: function( one, two, three, four, ..., twenty-seventh ) {
this.one = one;
this.two = two;
...
this.twenty-seventh = twenty-seventh;
}
}
Now, I'm going to do this a lot (approximately thirty or forty times),
so I was wondering if there was a way to use the arguments array and a
little bit of evaluation tomfoolery to make it a bit more compact.
Thanks for any insights you give!