Java Reference
In-Depth Information
Your First JavaScript Program
That's enough talk about JavaScript―it's time to write your first program!
It is a tradition when learning programming languages to start with a "Hello world!" pro-
gram. This is a simple program that outputs the phrase "Hello world!" to announce your ar-
rival to the world of programming. We're going to stick to this tradition and write a "Hello
world" program in JavaScript.
Go to JS Console in your browser and enter the following line of code:
console.log("Hello World!");
If all went to plan you should see a line in your console saying "Hello World!", similar to
the screenshot in Figure 1.1 .
Search WWH ::




Custom Search