Course Content
Introduction to JavaScript
Note
In this chapter, you should not memorize all the terms and think about them. Now we will look at some things superficially so that later it will be clear what we are talking about. Terminology and usage of syntax will be covered throughout the course.
JavaScript has a default syntax with parentheses, curly brackets, and semicolons.
Look at the example of code:
- Here, you can see the
console.log()
command. This is called a function. - The parentheses
()
is a function call. - The arguments expected by the function are in parentheses.
- The string
"Hello! Let's learn Javascript!"
is a literal. - The semicolon
;
is an end of command.
A literal can be different types of data, which we will look at later. Literals are just values.
Let's look at the harder example:
let
andwhile
are keywords (built-in functions with a simple syntax).- The curly brackets
{}
is a body of the function. =
,<
and+
are operators.a
is a variable.
Note
A variable can be used as a literal.
This example seems difficult now, but after completing the course, you will understand it very well, and it will seem very easy to you.
The keywords will be described later. Now you should look at the syntax of JavaScript.
Summary
Syntax | Name |
console.log() | a function. |
(x) | a function calling (here the x is an argument). |
"something" , 1 , 2 , 3 | literals. |
let and while | keywords. |
{} | a body of a function. |
let k | the k is a variable here. |
; | an end of command. |
I will remind you during the course about these concepts.
Section 1.
Chapter 2