Help me please to understand why it doesn't show return's strings?? When you win or lose it supposed to show the result. I got this code from codeacademy. On their console in works perfectly, but when you try to run it on browser it does not work properly. Confused...

You were missing the last document.write to write the result to the document. You can format it yourself. I'd also suggest adding another case if the input isn't valid. You could also put the main prompt in a function and call recursion if the input isn't valid.