Functions and if / else


I can't understand why in this particular exercise i had to call the function three different times and how did the right one got printed.


Please post your code, and explain further your question.


I don;t have a problem with the code,I passed.It was kinda easy.But i can't understand the exercise


Probably to see that it works for different inputs. And you should see all three if you use console.log if you don't, than you just see the last value that occurs in your code.