Need Help With the Function Parameters Reminder Problem | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Need Help With the Function Parameters Reminder Problem

I'm having trouble figuring out why the output of my code is "You set a reminder about NaN". function main() { var eventExample = readLine(); // function call setReminder(eventExample); } //complete the function function setReminder() { var eventExample = parseInt(readLine()); console.log("You set a reminder about " + eventExample); }; The question is to have the output be "You set a reminder about" + event (which is the input). I've been looking for something to help anywhere on the internet, but I seem to be stuck on this one.

22nd Feb 2021, 9:41 PM
Arthur Laffer
1 Resposta
0
you call the input function twice. Since there is only one input, the second call to input will simply read a blank.
23rd Feb 2021, 3:14 AM
Wilbur Jaywright
Wilbur Jaywright - avatar