Skip to content

Commit

Permalink
Solve #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Lopez committed Oct 7, 2017
1 parent 3271cdd commit df887f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions solutions/5.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const funct = ()=>{
console.log('calling function');
}

const recursionFunct = (funct, num, fu='') =>{
const recursionFunct = (funct, num, fun='') =>{
if(num === 0){
return f;
return fun;
}
fun = fun + funct();
return recursionFunct(funct, num-1);
Expand Down
10 changes: 9 additions & 1 deletion test/5.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
const solution = require('../solutions');

const functionCall = (
const functionCall = (funky, numb, tester)=>{
if(solution(funky, numb) === tester){
console.log('correct');
}else{
console.log('incorrect');
}
}

functionCall(funct, 2);

0 comments on commit df887f0

Please sign in to comment.