0
Why wouldn't this code work?
function main() { var eventExample = readLine(); // function call setReminder(eventExample) } //complete the function function setReminder(a) { var b = "You set a reminder about "; return a + b }; main();
4 Answers
0
I made it work wtih:
console.log (b+a) instead of the return statement...
and deleted main(); from the bottom....
But... why doesn't work the other day?
0
return just returns a value to call statement. You need to catch it to use like :
console.log( setReminder(eventExample)) ;
0
But wouldnt the return be called from the main() function?
0
main() function calling the setReminder () function which returns a value to call statement in main() function. You can use it according to your requirement.. Like print, store, ....



