Free course
JavaScript: Perfect for Beginners
Programming learning is an interesting and exciting process. The syntax of the language is the simplest and shortest path, without which it is impossible to start. This free online JavaScript course will introduce you to the basic concepts of the language. Learn the basics and write your first JS programs
18 hours112931 students72 lessons with practice in the browser
Start LearningSign UpJavaScript basics
JavaScript is one of the most popular programming languages in the world.
It is used to build interactive web pages, mobile applications, and in server-side development. You will learn JS from scratch, from the very beginning. The first module provides a launching pad for writing meaningful programs. We will find out how to write your first JS code. Learn what comments are and why programmers need them. By checking your solutions, we will examine what testing is and how to read the output of tests.
Arithmetic
Modern applications are created to serve business goals, help in everyday life and entertain. However, they are still based on computations. The simplest and basic topic in programming is arithmetic. In this module, you will translate arithmetic operations into the programming language, talk about the operator precedence and operations with fractional numbers. We will recall math classes and find out what happens when you divide by zero in JavaScript. Finally, we will explain what a linter is and why it can be grumpy sometimes.
Strings
In programming, text is called string, and this topic is not that simple. How do you print a phrase that has both single and double quotation marks? How to deal with text at all, since the computer is unaware of any letters! This module deals with various aspects of text writing — from quotation marks and escaping to encoding.
Variables in the JavaScript
Information can be stored in variables. They allow you to reuse already existing data and eliminate duplicates from your code. In this module, we will show you how to modify and name variables to make your code readable for any developer. You will find that naming a variable can be tricky! Learn how to use variables to simplify complex computations.
JavaScript data types
JavaScript is a weakly typed language with immutable primitive data types. What will happen if you try to multiply a number by a string? How does JavaScript recognize the type of a given data? And what does JavaScript do when it sees a type mismatch? Find the answers to these questions in the current module.
Let's get started
Calling functions
Concept of function defines any arbitrary operation in programming. Functions are the bricks from which programmers build systems. In this module, you will learn how to use built-in functions. We will examine the function signatures in the documentation and figure out how to use it. We get familiar with standard libraries which provide thousands of functions. You can’t memorize all the functions, so every programmer should know how to find documentation.
Properties and Methods
The data we use in our programs can have important properties. In JavaScript, properties are built-in directly into the language. Besides properties, there are methods — functions within properties. Properties and methods are expressions, just like variables, constants, or function calls, which means that you can combine them in many ways. We elaborate these topics deeply in separate courses dedicated to object-oriented features of JavaScript. Here we will cover the basics.
Function definition
Defining your own functions makes writing and maintaining programs much easier. The ability to define functions, for example, allows complex (composite) operations to be merged into a single operation, with the complexity hidden behind a simple function. Learn to write functions and take the first step toward creating truly useful programs. This module will teach you how to name functions (as well as variables and constants) and create your own.
Logic
Logical expressions allow you to answer questions that arise during program operation. Is the user authenticated? Is the subscription paid? Is it a leap year? In this module, you will study predicate functions - those who ask a question and answer it - whether it is true or false. Practice writing such functions and move on to more complex logical expressions.
Conditionals
The task of the predicate function is to get an answer to the question, but you often need to go ahead and do something depending on the answer. If and Switch are JavaScript statements by which a programmer can determine the required program behavior depending on different conditions: skip certain instructions and run others. We will analyze them by practicing in this module.
Loops
Any code can be repeated thousands, millions, or even billions of times. This offers up a lot of possibilities for building programs and sophisticated systems when combined with the other tools you already know – variables and conditions. Here's an obvious example. In a 500-page book, you must locate a specific phrase. The phrase is fresh in your mind, but you can't recall the page number. The quickest (and most time-consuming) method is to go through each page until you find the right one. Loops are required for such repetitive activities.
Are you ready?
Registration is not required