console.log(array[i]+','+array[i+1]) code example Example: how to console log array in javascript console.log(arrayName);