var names = new Array("Mary", "Tom", "Jack", "Jill"); function disp(arr_names) { for (var i = 0; i < arr_names.length; i++) { console.log(names[i]); } } disp(names); //Mary //Tom //Jack //Jill