In this example we are instructing our web browser to display a popup window with the message “This is a sentence”
Comments: Comments are phrases written in the code to make it possible for developer to document or leave comments about the code. Comments are ignored and are not executed by the browser comments are indicated using the symbols // or /**/
To comment a single line of code we use the // and to comment a block of code or many lines of code we use /**/
// This is one line comment /* This is multiple line comment */
- Using the <script></script> tags within the tags of the HTML page.
- Using <script></script> tags within the <body></body> tags of the HTML page.<