So i want to declare variable according to my loop. so i have done the following
$.each(filter,function(key,value){
var value;
});
my filter array contains:
Geo_Name_date,Geo_Gender_date,Geo_Age_date,Geo_Ethnicity_date,Geo_Race_date,Geo_Language_date,Geo_Smoker_ind_date,Geo_Primarycare_provider_name_date
When i alert after the loop over. the variable should alert undefined. But its giving reference error. any suggestion or what am doing wrong? is it possible to do like this?