The debug print outputs to whichever terminal you ran dfx start in. If you wanted to get a return value you’d need to have the function in your Motoko code return the text and have a return type async Text. The other tutorials will go through this for you.