0

How do i modify the function so that it returns the variable result help?

function addNumbers(a: number, b: number) { let result = a+b; for(let i = 0; i<addNumbers; i++){ result+=stringToRepeat ; } } let sum = addnumbers(7,5);

3rd Feb 2017, 6:43 AM
Alejandro
Alejandro - avatar
1 Réponse
+ 1
return result; at end of your function ^^
3rd Feb 2017, 7:51 AM
visph
visph - avatar