Every recursive function needs a way to "bailout". Some way of determining that it should no longer call itself.
Your function has no bailout condition so it will call itself endlessly.
Properly indent your code and this would have become apparent. Your
if
statement only outputs 1 to the console log when n == 1. There's no exit of the function before calling itself again.
recurSum(n)
{
if(n == 1)
console.log(1);
console.log(n + recurSum(n - 1));
}