Creating Your First Program
Let's start with one statement, the classic first program in any programming language, creating "Hello World".
alert("Hello World!);
You can change text inside that parentheses everything you like, and it will pop out in browser page.
Congratulation, you just write your first code.
Input and Output
Input and output are really important in computer program. We always want to process our input to become expected output. Javascript is all about web pages. It doesn't read files on your hard drive or connecting to your printer, it's interested primarily what on the web page and what you might interact with on the web pages.
We already make output with 'alert', but now let's get something into our program.
var name = prompt("What is your name?");
alert("Hello, " + name);
'prompt' is similar to alert, but expect something as input. That input then we store in variable 'name' and printing in monitor using 'alert'.