7 . Combine arrays arr1 and arrays arr2. do not directly modify the array arr, the result returns a new array
function concat (arr1, arr2) {return arr1.concat (ARR2);}
or examine the Concat method without modifying the original array.
8, add an element item to the index of ARR. do not directly modify the array arr , resulting in the return of the new array  
function Insert (arr, item, index) { var arrright=Arr.slice (index,arr.length); var arrleft= arr.slice (0, index); var arrm=return arrm.concat (arrright);}
These questions sit down, summed up found that as long as the "Do not modify the array", the basic need to use the Concat method and slice method.
9, count the number of occurrences of an element with the value equal to item in arr  
function count (arr, item) { var count=0; for (var i=0;i<arr.length;i+ + item) {count ++ return count;}
10. find the repeating element in the array arr
function duplicates (arr) { var arrstr=arr.join (); var result; for (var i=0;i<arr.length;i+ + if (Arrstr.indexof (arr[i) )!= Arrstr.lastindexof (Arr[i])) {Result.push (arr[i]); }} return R Esult;}
Write your own method, the test result is, can find the duplicate elements, However, when displayed, all duplicates are displayed, as follows:
Obviously not, continue to improve!!
Just wait until I change it, and then come back and write.
JavaScript Array Partial programming (iv)