function solution(a, b) {
var answer = 0;
if(a<b){
for(var i=a; i<=b; i++){
answer = answer + i;
}
}else if(b<a){
for(var i=b; i<=a; i++){
answer = answer + i;
}
}else{
answer = a;
}
return answer;
}
function solution(a, b) {
var answer = 0;
if(a<=b){
for (var i=a; i<=b; i++){
answer = answer + i;
}
}else{
for (var i=b; i<=a; i++){
answer = answer + i;
}
}
return answer;
}
//음수도 고려해야 함
#Math method - max, min, abs
#The Math.abs() function returns the absolute value of a number