Hexlet doesn not really work properly in your browser, because it is pretty old.
Please, upgrade. Choose browser.

Intro to Programming

What are computers really? Do they speak programming languages? Is it hard to write your own programs? This course answers these and many other questions and explores the nature of computers, code and some fascinating ideas that allowed us to create modern computers, mobile phones, internet and, you know, pretty much everything we rely on every day.


What's a computer anyway?

↳ theory (video 05:32)

Ask and try to answer some simple, but important questions: what's a computer anyway? Is it smart? Does it speak programming languages?


Human and computer languages

↳ theory (video 05:43)

Explore the idea os programming languages and figure out what language should you strat with.


Writing your first program

↳ theory (video 05:10) / quiz / exercise

Write your very first program in JavaScript and get to know the Hexlet's virtual computer that you'll be working in during the course.


Constants and E=mc2

↳ theory (video 05:04) / quiz / exercise

Learn about basic math in JavaScript, work with numbers and constants to calculate the total energy of your body using Einstein's famous formula.


Making functions — black boxes

↳ theory (video 05:11) / quiz / exercise

Learn about functions — the building blocks of programs, how to create and run functions.


IF conditions and programs making decisions

↳ theory (video 05:43) / quiz / exercise

Learn about conditions and boolean algebra, the mechanism that allows programs do one thing or do another thing based on some information.


Oh, no, errors! And dealing with them

↳ theory (video 07:54) / quiz / exercise

Understand how errors arise in computer programs, how to recognize them and fix them.


Recursion: when function calls itself

↳ theory (video 06:31) / quiz / exercise

Wrap your head around one very powerful and extremely important concept in programming — recursion.


Iterative process and not being lazy

↳ theory (video 06:05) / quiz / exercise

Recursion is great, but the plain recursive process is not too efficient. Learn about an alternative way to compute recursively.


Variables and repetitions

↳ theory (video 07:14) / quiz / exercise

Learn about variables and a way of repeating code with loops. Understand the important distinction between declarative and imperative programming.



↳ theory (video 05:27) / quiz / exercise

Get to know text data, strings and learn to manipulate them: glue together or take apart.


Mutators and for loop

↳ theory (video 02:36) / quiz / exercise

Learn some arithmetic shortcuts to quickly change the values of variables, and get to know the for loop — another way to create repeating code.


Testing code with other code

↳ theory (video 05:19) / quiz / exercise

Understand the idea of testing code — writing code that checks the behavior of other code, look at some examples and write your own tests


Dividing code into modules

↳ theory (video 05:35) / quiz / exercise

Learn about dividing code into meaningful and reusable modules.


Expressions vs. Statements

↳ theory (video 04:38) / quiz

Understand the important distinction: expressions vs. statements in JavaScript. And learn how this knowledge will help you.


Environment, scope and closures

↳ theory (video 07:39) / quiz / exercise

Understand how and why isolated environments are created in JS, what scoping is and how cool are closures.


Typing: dynamic vs. static and weak vs strong

↳ theory (video 07:22) / quiz / exercise

Learn about types in JavaScript, and understand the difference between dynamic and static typing and weak and strong typing.


Pure functions and side effects

↳ theory (video 06:55) / quiz / exercise

Explore the idea of determinism, side effects, and purity in functions. Get to know the beauty of pure functions.

★ Challenges

We recommend you to work on these challenges after completing the course. They will help you obtain more experience in programming and strengthen new skill.

& answers