let obj = {a: 1, b: 2, c: 3, d: 4, e: 5};
function getSum(obj) {
let arr = [];
for(let key in obj) {
arr.push(obj[key]);
}
let sum = arr.shift();
if(arr.length !== 0) {
sum += getSum(arr);
}
return sum;
}
console.log(getSum(obj));