var data = [1, 2, 3, 4, 5, 6]; var sum = 0; data.map(function(item, index, arr) { arr[index] = item; if (arr === data) { document.write('fdd' + true); } }) document.write(data);