This is my code:
var array=[];
var shopId =[1,2,3,4];
for(var i in shopId){
function(result){
---------------
--------------
array.push(result);
console.log(array);//result have values
}
}
console.log(array);//result empty
The final console have array with empty value.Please help me to sort out this problem..
via midhun k
No comments:
Post a Comment