var getSun=function (n1,n2){ for(var i=n1,s=0;i<=n2;i++){ s+=i } return s; } console.log(getSun(1,200))