I have an array with elements [1, 2, 3, 4], how do I find different combinations to add? The output should be:
1+2, 1+3, 1+4, 2+3, 2+4, 3+4, 1+2+3, 1+2+4, 1+3+4, 2+3+4, 1