Here is the command to print words on the screen.
<script language="JavaScript">
var numbers = 99*99;
document.write("Hi!!! ");
document.write(numbers);
</script>
Result:
Hi 9801
I'm introducing two new things. First of all the Semi-Colin(;). It tells the script that where that semi-Colin is located that is the end of a line. It gets helpful in long scripts. Then the Document.Write(), This is where you put words or variables that I want to show up on the web page. I wrote HI!!! in one of them, you have to include the parenthesis if you want to display text, and no parenthesis if you want to put in a variable. As you can see I declared a variable as 99 times 99. It displayed that after the Hi!!! because its after it in the code. |