I\'ve seen several similar questions about how to generate all possible combinations of elements in an array. But I\'m having a very hard time figuring out how to write an a
Try this: https://jsfiddle.net/e2dLa9v6/
var array = ["apple", "banana", "lemon", "mango"]; var result = []; for(var i=0;i