20+ Fundamentals Every JavaScript Developer Should Know
Tags: webdev, productivity, javascript, beginners
Published: 2021-04-28 10:22:49

You’ve learned **React**, mastered **npm install**, and can find your way around **webpack.config.js**. You can do just about anything as long as there’s a module for it, and there seems to be a module for everything. But what happens when you can’t find a module? Where do you go when you can’t find the answer on **Stack Overflow**? You feel like a solid developer, but there’s a gnawing sensation in the pit of your stomach. You don’t like to think about it, but it’s there. The truth… **A lot of this is wizardry to you**. If there wasn’t an example out there, in some cases you’d have no idea how to get any of this working.

What can you do? What if someone finds out? Maybe that’s the REAL reason white boards scare you? Fret no more fellow developer. **We’ve all been there**. The solution has been staring you in the face this whole time, and yes we both know you’ve been avoiding it. It might be time you took the time to **really understand JavaScript**, and maybe **even learned a little computer science**.

Here’s what you need to do:

1.Understand how a line of high-level code like JavaScript turns into and gets executed as a stack frame on the call stack (from high level languages to machine code).

2.Understand how different primitive types are stored in memory, down to the addresses, space allocated, and binary representation (if you haven’t run into the word mantissa you’re not far enough).

3.Understand the difference between value types and reference types, and assigning values vs assigning pointers.

4.Understand implicit typing, explicit typing, nominal typing, structural typing, and duck typing.

5.Understand function scope, block scope, and lexical scope.

6.Understand the difference between an expression and a statement, and what it means to evaluate an expression.

7.Understand what happens (or doesn’t) in memory/on the call stack when an expression is evaluated, argument passed, result returned, etc. vs when a value is assigned or retrieved from a variable.

8.Understand IIFE’s, modules, and namespaces. And why ES6 modules and block scope don’t fully replace IIFE’s.

9.Understand how the message queue and event loop work in JavaScript specifically, and how it affects timing, hang, async, etc.

10.Understand what opts and deopts are, and how to keep up to date on the across the different JavaScript engines.

11.Understand how to represent numbers in binary, hex, dec, scientific notation, etc. in JavaScript and other languages.

12.Understand how bitwise operators, typed arrays, and array buffers work. Use understanding RGBA as a way to understand how to manipulate binary data.

13.(browser) understanding how the in-memory DOM and layout trees are built and modified, when/how reflows/layouts, composites and repaints are triggered.

14.Understand new, constructors, instanceof, and instances.

15.Understand prototypical inheritance and the prototype chain. And how even with class JavaScript still doesn’t achieve classical inheritance.

16.Understand the differences between Object.create and Object.assign.

17.Understand factories and classes, and how these approaches differ.

18.Understand the difference between member properties and properties on the prototype.

19.Understand pure functions, side effects, and state mutation

20.Understand how closures work, and how they look on the call stack.

21.Understand how high order functions work, and when to use them.

22.Understand what abstract data structures are, how to build them in JavaScript, and typical use cases for them.

23.Understand recursion and how to use them to build abstract data structures.

24.Understand that algorithms to solve many common problems exist, and be familiar enough with them to find the one you need on Google because nobody remembers all of them. Or even most of them.

25.Understand the difference between the is a and has a relationship when it comes to inheritance, polymorphism, and code reuse.

26.Become familiar with the common design patterns, and which ones have uses in JavaScript.

27.Understand partial functions, currying, compose, and pipe. And understand why unary functions are so useful.

28.Understand how reflection is different in JavaScript than in strongly typed, compiled languages, and why.

Here you have it. The key to demystification. Did I miss something? If yes, feel free to send me an answer in the comments