I am working through the rock, paper, scissors assignment and the “get unstuck” video mentioned that when you console.log(var) (var = ‘string’) you will print the ‘string’ as expected. However, this will also print “undefined” if you do not request a return value as part of an else statement according to the tutorial.
I understand this as a “what” but not as a “why.”
Is this due to the data type? Would any and all possible printed characters return undefined if no return is requested in an else statement?