JavaScript fundamentals
Theory: Hello, World!
As usual, we'll start by writing a "Hello, World!" program. The program will print the text. To print something, you need to give computer a special command. In JavaScript, we use console.log().

We will sometimes show the result of running code lines using the comments, like this: => RESULT. For example, // => 4.
Comments
The source code files may contain comments in addition to the code. This is non-executable line(s) of text that is required for programmers to take notes. They're used to describe how the code works and what errors need to be fixed, as well as to remind you to add anything later.
Comments in JavaScript are of two kinds.
Single line comments start with //. Any text or symbols that follow, won't be evaluated or executed. A comment can take up the whole line or several lines:
or can follow some code on the same line:
Multiline comments start with /* and end with */.
Such comments usually clarify the purpose of pieces of code and build its documentation.
Recommended programs
Completed
0 / 39

