After an exhaustive search, I have yet to find a clear answer to address my problem. This may in part be due to incorrect or imprecise references to javascript terminology as object proiented programming is new to me.
var numArray = [0.123456789, 31.415, 314.15, -314.15, 0.0, 0, 1, 10, 100];
var AlignDecimal = function(NumberArray){
var numberStructure = [{
value:0,
toString:"",
decimalIndex:-1,
integer:"",
integerLength:-1,
mantissa:"",
mantissaLength:-1,
sign:""
}];
for (var i = 0; i < NumberArray.length; i++){
numberStructure[i].value = NumberArray[i];
println(numberStructure[i].value);
}
};
AlignDecimal(numArray);
I'm hoping from the above that there's enough information to ascertain my ultimate programming objective.
Originally I tried:
numberStructure.value = NumberArray
This partially worked except that .value had become an array, rather than numberStructure[].value.
Then I tried:
numberStructure = NumberArray
Now numberStructure[] array recieved NumberArray[] but, obviously, numberStructure[].value was undefined.
Also tried:
for (var i = 0; i < NumberArray.length; i++){
numberStructure[i].value.push(NumberArray[i]);
println(numberStructure[i].value);
}
That didn't work either.