How do i modify the function so that it returns the variable result help? | Sololearn: Learn to code for FREE!

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);

2/3/2017 6:43:53 AM

Alejandro

1 Answer

New Answer

+1

return result; at end of your function ^^