I want to get all the variables which are set on DOM before with a single function. I am not sure it is possible in javascript or not.
var a= 1;
var b=2;
var =3;
var all_data= get_all_vars();
function get_all_vars(){
//this function should return
// return array('a'=>1, 'b'=>2, 'c'=>3);
}
Please suggest me the answer. Either it is possible or not. If it is possible how to do it? Thanks In advance.