I am having a small issue with variable assignment. For some reason my line variable doesn’t properly assign.
var records = new Array();
var recid = -5
var subrecid = 6495;
var line = new Array();
line['recid'] = recid;
line['subrecid'] = subrecid;
if (subrecid > 0) records.push(line);
Don’t use an array for non-integer indexing. Use an object. Also, it’s generally better to use
[]instead ofnew Array(). Oh yeah, and there’s a line missing a semicolon.Even more concise: