Driver Code
let arr1 = [ 1 , 5 , 7 , 2 , 9 , 14 ] ; document . write ( numOfCombinations ( arr1 , 6 ) + " " ) ; let arr2 = [ 3 , 6 , 9 , 12 ] ; document . write ( numOfCombinations ( arr2 , 4 ) + " " ) ;