惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LangChain Blog
月光博客
月光博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
博客园_首页
T
Tailwind CSS Blog
P
Proofpoint News Feed
雷峰网
雷峰网
D
Darknet – Hacking Tools, Hacker News & Cyber Security
IT之家
IT之家
V
Vulnerabilities – Threatpost
阮一峰的网络日志
阮一峰的网络日志
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs
S
Schneier on Security
Security Archives - TechRepublic
Security Archives - TechRepublic
L
Lohrmann on Cybersecurity
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
WordPress大学
WordPress大学
The Register - Security
The Register - Security
N
Netflix TechBlog - Medium
Hugging Face - Blog
Hugging Face - Blog
Project Zero
Project Zero
博客园 - 叶小钗
F
Full Disclosure
大猫的无限游戏
大猫的无限游戏
Latest news
Latest news
S
SegmentFault 最新的问题
C
Cyber Attacks, Cyber Crime and Cyber Security
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
L
LINUX DO - 最新话题
Google DeepMind News
Google DeepMind News
P
Privacy International News Feed
I
InfoQ
F
Fortinet All Blogs
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Threatpost
T
Tenable Blog
B
Blog RSS Feed

Dmitri Pavlutin Blog

Pure Functions in JavaScript: A Beginner's Guide Record Type in TypeScript: A Quick Intro How to Write Comments in React: The Good, the Bad and the Ugly 4 Ways to Create an Enum in JavaScript React forwardRef(): How to Pass Refs to Child Components TypeScript Function Types: A Beginner's Guide How to Use v-model to Access Input Values in Vue Mastering Vue refs: From Zero to Hero Environment Variables in JavaScript: process.env 5 Must-Know Differences Between ref() and reactive() in Vue How to Destructure Props in Vue (Composition API) Triangulation in Test-Driven Development How to Use nextTick() in Vue Programming to Interface Vs to Implementation A Smarter JavaScript Mapper: array.flatMap() Array Grouping in JavaScript: Object.groupBy() How to Access ES Module Metadata using import.meta JSON Modules in JavaScript How to Trim Strings in JavaScript TypeScript Function Overloading How to Debounce and Throttle Callbacks in Vue How to Show/Hide Elements in Vue Sparse vs Dense Arrays in JavaScript How to Fill an Array with Initial Values in JavaScript Covariance and Contravariance in TypeScript What are Higher-Order Functions in JavaScript? How to Use TypeScript with React Components Index Signatures in TypeScript How to Use React useReducer() Hook unknown vs any in TypeScript A Guide to React Context and useContext() Hook How to Use Promise.any() 2 Ways to Remove a Property from an Object in JavaScript 'return await promise' vs 'return promise' in JavaScript How to Use Promise.allSettled() How to Use fetch() with JSON JavaScript Promises: then(f,f) vs then(f).catch(f) What is a Promise in JavaScript? How to Use Promise.all() A Simple Guide to Component Props in React Don't Stop Me Now: How to Use React useTransition() hook A Simple Explanation of JavaScript Variables: const, let, var ES Modules Dynamic Import How to Memoize with React.useMemo() How to Cleanup Async Effects in React Why Math.max() Without Arguments Returns -Infinity How to Debounce and Throttle Callbacks in React Don't Confuse Function Expressions and Function Declarations in JavaScript How to Use ES Modules in Node.js Solving a Mystery Behavior of parseInt() in JavaScript How to Use Array Reduce Method in JavaScript 3 Ways to Merge Arrays in JavaScript A Guide to Jotai: the Minimalist React State Management Library The Difference Between Values and References in JavaScript How to Implement a Queue in JavaScript A Helpful Algorithm to Determine "this" value in JavaScript React useRef() Hook Explained in 3 Steps 7 Interview Questions on "this" keyword in JavaScript. Can You Answer Them? How to Greatly Enhance fetch() with the Decorator Pattern 7 Interview Questions on JavaScript Closures. Can You Answer Them? What's a Method in JavaScript? array.sort() Does Not Simply Sort Numbers in JavaScript How to Solve the Infinite Loop of React.useEffect() The New Array Method You'll Enjoy: array.at(index) What's the Difference between DOM Node and Element? Why Promises Are Faster Than setTimeout()? Everything About Callback Functions in JavaScript How React Updates State 5 Mistakes to Avoid When Using React Hooks 5 Best Practices to Write Quality JavaScript Variables Type checking in JavaScript: typeof and instanceof operators 3 Ways to Check if a Variable is Defined in JavaScript React Forms Tutorial: Access Input Values, Validate, Submit Forms Prototypal Inheritance in JavaScript How to Timeout a fetch() Request A Simple Explanation of React.useEffect() A Simple Explanation of JavaScript Iterators How to Use React Controlled Inputs Everything about null in JavaScript How to Use Fetch with async/await Getting Started with Arrow Functions in JavaScript An Interesting Explanation of async/await in JavaScript Front-end Architecture: Stable and Volatile Dependencies Is it Safe to Compare JavaScript Strings? How to Access Object's Keys, Values, and Entries in JavaScript What Actually is a String in JavaScript? 3 Ways to Shallow Clone Objects in JavaScript (w/ bonuses) Checking if an Array Contains a Value in JavaScript JavaScript Event Delegation: A Beginner's Guide How to Parse URL in JavaScript: hostname, pathname, query, hash 3 Ways to Detect an Array in JavaScript How to Get the Screen, Window, and Web Page Sizes in JavaScript 3 Ways to Check If an Object Has a Property/Key in JavaScript How to Compare Objects in JavaScript Object.is() vs Strict Equality Operator in JavaScript Own and Inherited Properties in JavaScript 5 Differences Between Arrow and Regular Functions How to Use Object Destructuring in JavaScript Your Guide to React.useCallback() 5 JavaScript Scope Gotchas
How to Learn JavaScript If You're a Beginner
Dmitri Pavlutin · 2020-10-20 · via Dmitri Pavlutin Blog

You've decided to learn JavaScript because you want to become a Frontend or Backend developer.

But how do you start? Which road to take to learn JavaScript efficiently, and, if possible, less painful?

In this post I share my experience and principles on how to learn JavaScript fundamentals and stay motivated in the process.

Note: JavaScript fundamentals I consider the keywords, data types, operators, variables, expressions, functions, closures, objects, prototypal inheritance, classes, this, promises, async/await.

1. Step by step

Stephen King is one of my favorite writers. He has published around 61 novels. Many of these have been adapted into movies and TV series.

When King was asked in an interview "How do you write?", he answered:

One word at a time.

There are no shortcuts or silver bullets to write a good book: you write one word at a time. He writes a book word by word, minute by minute, hour by hour until it's completed.

Step by step principle applies to learning JavaScript language too. There are no shortcuts or silver bullets on how to learn JavaScript: you need, step by step, to understand each concept of the language.

2. Learn the way you like it

There are plenty of ways to learn JavaScript: by reading books, watching video courses, attending freeCodeCamp.

2.1 Books

My preference is to learn from books. Books let me understand the information in silence, at my own pace, allow me to re-read multiple times what is difficult.

The game-changer for me in understanding JavaScript was reading from cover to cover JavaScript: The Definitive Guide (6th edition). The book teaches in an accessible manner all simple to advanced concepts of JavaScript.

If books are your thing, take the following:

It's not enough only to read the book. You need a way to retain the information. I use these practices to solidify knowledge while reading.

First, write notes of important ideas in a notebook while reading. That's efficient because when you note the idea, you think more about it and retain better. Repetition is the mother of skill.

A page with notes I had taken when reading "JavaScript: The Definitive Guide":

Writing notes when learning JavaScript

Second, play with the code snippets you encounter in an online JavaScript editor, for example in jsitor or codesandbox.

2.2 Video courses

Video courses have the benefit of being more interactive than books.

The course author can explain the difficult concepts in a human-understandable way. Plus, guided by the author, you can practice by creating real-world applications.

A list of JavaScript beginner courses to consider:

2.3 freeCodeCamp

You can also attend to learn JavaScript at freeCodeCamp. Register and choose the course "JavaScript Algorithms and Data Structures Certification".

First, freeCodeCamp is completely free.

Second, the lessons are high quality and at the end of each lesson you can practice exercises to solidify what you've learned.

3. Done is better than perfect

Whatever option you've chosen to learn JavaScript — from a book, video course, or freeCodeCamp — complete it from the start until the end.

It is vital to have a full understanding of JavaScript fundamentals. Having knowledge gaps is always going to slow you down and put into trouble. Half-knowledge is no knowledge.

I know that sometimes, especially around the middle of the book or course, things can become boring. Or you can think that the explained feature isn't needed. Or you might want to skip because it's complicated.

Resists the urge to abandon at the middle, and push yourself to study until the end. It's OK if you don't understand everything, it's OK if you still have questions: done is better than perfect.

4. Don't cherry-pick

Long time I was working as a developer without having a solid understanding of JavaScript. I was cherry-picking information from random posts, Stackoverflow.

Being tired of troubles because of knowledge gaps, I started reading "JavaScript: The Definitive Guide" in detail. After understanding the features of JavaScript I had been having troubles so long, I was blaming myself: why haven't I read this book earlier and avoided all the troubles?

Please don't make my mistake. Don't cherry-pick information about JavaScript fundamentals. Instead, follow a JavaScript fundamentals book or course, and complete it from the start until the end.

5. Pure JavaScript

A specific of Frontend development, where JavaScript is involved, is the abundance of UI libraries and frameworks like React, Vue, Angular.

A lot of beginner developers make the mistake of skipping JavaScript fundamentals, and jump into using a UI library like React.

No UI library or framework is going to compensate the poor knowledge of JavaScript. If you're bad at JavaScript — you're bad at React.

Do deliberately learn pure JavaScript fundamentals first.

6. Tricks to stay motivated

Saying is easier than doing. Here's a list of tricks to stay motivated and increase the efficiency of learning.

6.1 Morning hours are the most productive

The morning hours (from 07:00 AM until 12:00 AM) are the most productive in learning.

If you have the possibility, get up early morning, and commit to learning JavaScript during this timeframe.

6.2 End the lesson on the most interesting moment

Sometimes, after a few dozens of chapters or lessons, you may find difficult to motivate yourself to continue learning.

I overcome this by finishing the current session on the most interesting part. This way I have the interest to start next time.

7. Summary

Are you ready to become a JavaScript developer? Find your book or course, and get started today!

What's your favorite book or course to learn JavaScript?