How to write your first javascript program?

so, today; in this lecture we will be writing our first javascript program.

this is not counted as a part of tutorial series, instead i see this as an additional reference to what we have been studying since the beginning of this series.

so, this is not going to be long enough!

at first, let’s write a hello world program. it is considered to be lucky in programming!

its output will come as follows-:

at first, we wrote the <html> tag to start writing the html code.

then, we added <head> tag to say that the code is starting from now.

after that, we added <title> tag. a tag is ended as </title> i.e followed by  a backslash. and we can see that we ended that tag, just right after displaying “Javascript Hello World”.

after that our head tag ended to mean that we are no more working in the title part.

now, body tag needs to start

and we started the body tag as <body>

inside the body tag, we included a h1 tag. and inside the h1 tag, we wrote “Javascript Hello World Example”.

and,ended the h1 tag.

after that, we ended the body tag as </body>. likewise, we also ended the html tag as </html> to say that the program writing has been ended from now.

so, that’s it.

till now. you must have got some confidence in javascript.

bye bye for this time. keep learning javascript.

 

Share this and have a good day!

Facebook

Be the first to comment

Leave a Reply

Your email address will not be published.


*