Hello World
Welcoming you to my Easy JavaScript Series! Visit http://www.EasyProgramming.net for more tutorials!
by Nazmus Nasir
HTML
<p>
Well, Hello! Welcome to the Easy JavaScript series, part of <a href="http://www.easyprogramming.net">EasyProgramming.net</a>. Be sure to check out our tutorials on C++ and Excel!
</p>
<p>
This is the first Hello World tutorial. We'll write "Hello World" in three ways. first using <code>console.log()</code>, then by using the <code>alert()</code> function and finally by using <code>innerText</code> in the #welcome element below.
</p>
<div id="welcome">
</div>
CSS
#welcome {
font-size: 50px;
}
code {
color: blue;
}
JavaScript
//use console.log("type your message here"); to write to the console
console.log("Hello World!!!");
//use alert("type your message here"); to write to the window's alert box
alert("Hello World!!!");
//get the element id with document.getElementById("welcome") then use the innerText property to say Hellow
document.getElementById("welcome").innerText = "Hello World";