Before starting your javascript code you must always start with the
then do the document.write(“Hello To All”)
this will output the text it will just display as Hello To All.

document.write(“Hello To All”)

Now you can also use the same javascript on several different pages
this will excute the code.js

Comments are very important in your code because when you go back to edit your code
the comments will help you out alot.

//this is a single line comment

/*
This is a multiline comment
I can put alot more in here
*/

Heres a little example

/*
this is the welcome code
*/
<document.write(“welcome to are first javascript tutorial“); //welcome message

Advertisements