Bblizy43's Posts
Nairaland Forum › Bblizy43's Profile › Bblizy43's Posts
1 (of 1 pages)
Hey Guys, There is an opportunity for an office support in a co-working Hub at Ogba. Someone living around the Ogba and Agege axis is preferred to ease commuting struggles. The present occupant of the role is off on leave soon hence the opening is a 2 month contract. Serving corp members or interns can call in. Salary: 35k monthly Expected resumption: August 1st, 2019 send CV to sarah@foddscapital.com |
Please friends, help me out on this. I am trying to get a function that adds its indexes to itself. See below, everything seems to be working fine until i throw in the call back on line10 which gives me a stack exceeded error, seems I didnt get the callback rightly please help me check it out. I need it to complete my coins challange. Thanks alot. function addSelf(numberSet, targetSum) { var count = 0, count2 = 3; var res = 0; for (var i=0; i<targetSum; i++) { var setIndex = numberSet[i]; res +=setIndex; if (res > targetSum) count2--; if (res === targetSum) count++; //if (res < targetSum) addSelf(numberSet, targetSum); return {res , targetSum, count, count2}; } }; addSelf([1,2], 4); |
1 (of 1 pages)