Returning a value from a function in javascript (or any other language) does not automatically display it anywhere - you have to take the result and cause it to appear someWhere. If that wasn't the case, functions would become pretty much unusable as every time you called one, it would display the result even if the user doesn't need to see it!
Start here:
JavaScript Functions[
^] which shows an example of how to display a return value.