<html> </html> : tags that start and end each document (required).
<head> </head> : tags that start and end the header (required).
<title> </title> : tags that start and end the document title (required).
<body> </body> : tags that start and end the visible portion of your web page (required).
<script language="JavaScript"> </script> : tags that start and end your JavaScript code.
<b> </b> : tags that start and end bold font.
<i> </i> : tags that start and end italic font.
<center> </center> : tags that start and end centered text.
<h1> </h1> : tags that start and end standard font sizes (h1 - h7).
<br> : line break.
<p> : new paragraph.
<hr> : horizontal rule.
Math.round(): JavaScript standard rounding function.
Math.random(): JavaScript standard random number generator. It will produce a random number between 0 and 1.
Math.round(100 * Math.random()): This is how you compose the two previous functions to create a line of JavaScript that will result in random integers between 0 and 100.
Pseudo-Code | JavaScript |
---|---|
IF (predicate) THEN Basic block if predicate is true. ELSE Basic block if predicate is false. ENDIF |
if (predicate) { Basic block if predicate is true. } else { Basic block if predicate is false. } |
FOR i = 0 to 9 DO loop body. DOEND |
for (i = 0; i < 10; i++) { Loop body. } |