Skip to content

Instantly share code, notes, and snippets.

@bigmeech
Last active April 18, 2016 04:17
Show Gist options
  • Select an option

  • Save bigmeech/956ee17ea00a74c6606c228c429cd854 to your computer and use it in GitHub Desktop.

Select an option

Save bigmeech/956ee17ea00a74c6606c228c429cd854 to your computer and use it in GitHub Desktop.
function pairWise(list){
list.sort(function(a,b){
return a - b;
})
.forEach(function(num, index, listArray){
for(var i = 0;i < listArray.length; i++){
var result = num * listArray[i]
console.log(result,"=>", num,"X", listArray[i])
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment