Your first program
A program is a list of instructions the computer follows, one after another, from top to bottom.
The simplest useful instruction in JavaScript prints a message:
console.log("Good morning!");
console.logmeans "write this to the console", the text area where a program shows its output. Here, that is the Output box under the editor.- The text goes between quotes. Text in quotes is called a string.
- The semicolon
;ends the instruction, like a full stop ends a sentence.
Each console.log prints on a new line. Press Run ▶ to run your program and see what it prints.
Your task
Write a program that prints two lines:
Hello, world!I am learning JavaScript.
Run it to see the output, then press Check my code.