Which one is correct & Function call


Hello, i dont want to open two topics, so i’ll just ask two questions here.


why is everything black, when i press RUN? i called the function, but console.log doesnt respond? sry im new in coding


It only lets me post one picture per post, so i uploaded them to shrani.si (same as imagehack)

see i want to learn basics first, before i can upgrade myself to PRO and claim my certificate, which is the reason im doing this. But look at those two pictures… Same code, different result? which one has the right answer, and why? Thanks for helping me.:slight_smile:


By default, a function returns None at the end of the function. If we want to return something else at the end of the function, we can use the return keyword.

Given return is the last thing a function does, when a return keyword is reached, the function ends

so the console.log after return is never reached

and you don’t call console.log on your myOutfit function call, so the returned result is also not logged to the console


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.