How to get array into set of pairs using for loop and javascript map reduce functoins : <p>[1,2,3,4,5,6] should be changed to set containing {1,2},{2,3},{3,4},{4,5},{5,6} using normal for loop and using javascript map and reduce functions convert array to set of pairs using different techniques Thanks in Advance</p>
