JavaScript executes your code accordingly even if you forget a semicolon at the end of the line.
You must use a semicolon to separate the two pieces of code when putting two independent pieces of code on one line.
<html> <body> <SCRIPT LANGUAGE="JavaScript"> <!-- // Declare 2 numeric variables on the same line var varA = 5; var varB = 0.06; document.write(varA*varB); --> </SCRIPT> </body> </html>
0 comments:
Post a Comment