I want to declare multiple variables in a function:
function foo() { var src_arr = new Array(); var caption_arr = new Array(); var fav_arr =
No, your second statement will create four references to the same array. You want:
var src_arr = [], caption_arr = [], fav_arr = [], hidden_arr = [];