+ 1
Why the program does not shows error if i did not use semicolon after a statement?
I had written the following program: <html> <head> <title></title> </head> <body> <script type="text/javascript"> var num=100 document.write(num) </script> </body> </html> In this program, I had not used semicolon to separate the statements but the program does not shows any kind of error. Why? I Kindly request you to answer my question and clear my doubt. THANK YOU
2 Antworten
+ 1
In HTML you don't use a semicolon after a statement.unlike in CSS and JavaScript
0
Spike Sameer now, you don't need to use semicolon in js or javascript. But it is recommended to use semicolon. Language like java the still will show you errors if you miss semicolon