I have an array that consists of multiple arrays:
var array = [[1], [2, 1, 1], [3, 4]];
Now I want to get an array that has elements that are the sums of each array in the variable "array". In this example that would be var sum = [1, 4, 7]. How can I do this?