Write and Writeln

In order to output text in JavaScript you must use write() or writeln(). Here’s an example:

	
		
			 Welcome to my site
		
		
			
		
	
	

Note: the document object write is in lowercase as JavaScript is case sensitive. The difference between write and writeln is: write just outputs a text, writeln outputs the text and a line break.

Next up: The DOM


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *