function solution(a, b) { var answer = 0; const max=a>b?a:b; const min=a>b?b:a; if(a===b) answer=a; else{ for(let i=min;i<=max;i++){ answer+=i; } } return answer; }