```javascript
function insert_Sort(arr) {
var i, j, k;
if (arr.length == 0 || arr.length == 1)
return arr;
for (i = 1; i < arr.length; i++) {
var temp = arr[i];
for (j = i - 1; j >= 0; j--) {
if (arr[j] > temp) {
arr[j + 1] = arr[j];
arr[j] = temp;
}
}
}
return arr;
}
var arr = [1, 4, 10, 2, 5, 8, 6, 9, 7, 4];
console.log(insert_Sort(arr));