I really apologize if this has been asked before, but I've been searching/trying on my own for the last 4 hours and have nothing.
I am trying to figure out how to create a function in Javascript that will give me back the sum of all the numbers contained inside an array (i.e. [12, 50, 3] would give back 65.I need to be able to compute the sum of any sized array.
I know I'm a total noob at this, but this is what I have so far:
var findSum = function() {
}
var n = [10, 12];
findSum(a);
Won't be able to explain how grateful I will be for any help.
PS If you're browsing this, hello, Professor ;)