I referred this link (What is tail recursion?) but i can't get the answer by applying those steps ,can anyone explain please?
let sum = 5;
function sumTo(n) {
if(n==1) return n;
else {
return sum + sumTo(n-1);
}
}
let ss = sumTo(5);