The code looks like...

<script type = "text/javascript">
<!-- /* The comment indicators hide the script from older browsers. Without them the code might get written to the screen.*/
var x = prompt("Please enter your name.", ""); /* This creates the variable x and prompts the user for a name.*/
document.write ("Hello "+x); /* This writes the text to the page and appends the variable to the text.*/
// -->
</script>