Hello everybody
Iâm facing a problem with defining objects. What I need to accomplish is this:
var cnms = this.cNames.split("|");
myDP = new Array({cnms[0]:"Chris", cnms[1]:"Priceless"}, {cnms[0]:"Nigel", cnms[1]:"Cheap"});
Obviously, this doesnât work, otherwise I wouldnât be typing this right now. How do I define an object with variable properties ? Iâve tried eval(), but it doesnât work either.