can someone help me understand why this function isn’t returning the reduce value of newArry? it just logs function: reduce. I’m trying to find the final value of N descending to zero and then adding all those numbers together. One of the challenges on codeaccademy.

I wanted to create a new array using a loop to get the numbers from N to zero, then use reduce to add them together. But it just isn’t working and I don’t know why.

function simpleAdd(number) {

let i = number;

let newArry = ;

do {i - 1; newArry.push(i–)}

while (i >= 0);

console.log(newArry.reduce)

}

simpleAdd(2)