Month one: the language
Variables and types. Numbers, strings, booleans, plus the two special values for "nothing" — the difference between them is an interview staple.
Type coercion. A topic that pains beginners: the language silently converts one thing into another. Learn how strict comparison differs from loose, and always use strict.
Arrays and objects. Your main working tools. Master iteration, mapping, filtering and reducing — without them code looks like it came from a previous era.
Functions. Ordinary and arrow, the behavioural difference, default arguments, functions as values.
Conditions and loops. Plus the shorthand forms you'll meet in anyone's code.
Month two: the browser
Working with the document tree. Find an element, change its contents, add and remove nodes, alter styling.
Events. Clicks, input, form submission. Understanding how an event bubbles from a nested element up to its parent.
Forms and input validation. One of the most frequent tasks in real work.
Browser storage. How to keep data between visits.
Month three: talking to a server
Requests. Send one, receive a response, parse the data, handle the error.
Asynchrony. The key topic of the whole language. It requires serious study, which is why it has an article of its own.
The data interchange format. Turning an object into a string and back.
By the end of month three you should be able to build a page that fetches data from someone's server and shows it to a person, handling the case where the server didn't answer.
What can wait
- Classes and inheritance. Used less in modern code than you'd think.
- The finer points of call context. Knowing it exists is enough.
- Bundlers and their configuration. Learn to write first, configure later.
- Frameworks. Only once the language is solid: otherwise you'll know a framework and not the language.
Where people get stuck
Asynchrony. First place by a wide margin. Code runs in a different order from how it was written, and that breaks your model of the world.
The keyword for the current object. Its value depends on how a function is called, not where it was declared. Understood once, remembered forever.
Type coercion. Comparisons produce surprising results. Cured by the habit of strict comparison.
Iterating while mutating the array. A classic source of baffling bugs.
Testing yourself
Build a page: a search field, a request to an open data source, results in a list, with loading and error states handled. No frameworks.
If it works, the language is at a working level and you can take on a framework.
Хватит читать — пора делать
На CohortX можно найти команду под пет-проект и получить тот самый опыт, о котором спрашивают на собеседовании.
Похожие статьи
- TypeScript for beginners: why typesWhich problems types solve, the minimum to get started, and whether to take it on straight after JavaScript.
- TypeScript для новичка: зачем нужны типыКакие проблемы решают типы, минимум для начала работы, и стоит ли браться за это сразу после JavaScript.
- Asynchrony in JavaScript: understanding it once and for allWhy code runs out of order, what a promise is, and how to read the modern syntax without fear.