This particular script is designed to work with an array of objects that are structured in the following way: {html:whatever number:number value}.
function Org(data){
//array of objects
var Data=data;
for(var i=0; i<Data.length; i++){
var nums=[];
nums.push(Data[i].number);
console.log(nums);}
}
When provided with [{html:null,number:1},{html:null,number:1}], the expected output for the console log of Nums should have been [1,1] on the second iteration. However, it actually logs [1] on both the first and second iterations. This unexpected result raises the question: What might be causing this discrepancy?