I'm having some trouble finding unique entries in a record set. This is what I have so far.
function project5Part1() {
// Variable Declarations
var zipCode;
var outputDiv;
var records;
var i;
var j;
var null1;
var array = new Array(0);
var count;
// Get the HTML output table so we can add rows
outputDiv = document.getElementById('outputDiv');
// Open the Zip Code Study Records and make them
// available to the script
records = openZipCodeStudyRecordSet();
//Logic
while (records.readNextRecord()) {
zipCode = records.getSampleZipCode();
j = zipCode;
count++;
if (j === array[0 - count]) {
j = null1;
}else {
array.push(j);
}
}
// Output the entire data table
outputDiv.innerHTML = array;
}
I'm still pretty new to coding in general, and I've been banging my head on a wall for hours over this.
I think I'm pretty close to getting the program to do what I want, but I can't figure out how to check an array from one variable to another (In this case 0 through count) or if it is even possible.
Please help. :(