How much of JavaScript do you really think you know? You probably know how to write functions, understand simple algorithms, and can even write a class. But do you know what a typed array is?
You don't need to know all of these concepts right now, but you will eventually need them later in your career. Thatβs why I recommend bookmarking this list, because chances are, youβll encounter one of these topics, and then youβre gonna want a tutorial to fully understand it.
Itβs important to note that this list was inspired from the following repository:
leonardomso / 33-js-concepts
π 33 JavaScript concepts every developer should know.
Introduction
This repository was created with the intention of helping developers master their concepts in JavaScript. It is not a requirement, but a guide for future studies. It is based on an article written by Stephen Curtis and you can read it here.
π Considered by GitHub as one of the top open source projects of 2018!
Community
Feel free to submit a PR by adding a link to your own recaps or reviews. If you want to translate the repo into your native language, please feel free to do so.
All the translations for this repo will be listed below:
- Ψ§ΩΩΩΨΉΩΨ±ΩΨ¨ΩΩΩΩΨ©Ωβ (Arabic) β Amr Elsekilly
- ΠΡΠ»Π³Π°ΡΡΠΊΠΈ (Bulgarian) - thewebmasterp
- ζ±θ― (Chinese) β Re Tian
- PortuguΓͺs do Brasil (Brazilian Portuguese) β Tiago Boeing
- νκ΅μ΄ (Korean) β Suin Lee
- EspaΓ±ol (Spanish) β Adonis Mendoza
- TΓΌrkΓ§e (Turkish) β Δ°lker Demir
- ΡΡΡΡΠΊΠΈΠΉ ΡΠ·ΡΠΊ (Russian) ββ¦
Please give the author and contributors of the 33 JS Concepts repository some love for gathering this amazing list of resources! β€οΈ
So without further ado, letβs begin!
Table of Contents
- Call Stack
- Primitive Types
- Value Types and Reference Types
- Implicit, Explicit, Nominal, Structuring and Duck Typing
- == vs === vs typeof
- Function Scope, Block Scope and Lexical Scope
- Expression vs Statement
- IIFE, Modules and Namespaces
- Message Queue and Event Loop
- setTimeout, setInterval and requestAnimationFrame
- JavaScript Engines
- Bitwise Operators, Type Arrays and Array Buffers
- DOM and Layout Trees
- Factories and Classes
- this, call, apply and bind
- new, Constructor, instanceof and Instances
- Prototype Inheritance and Prototype Chain
- Object.create and Object.assign
- map, reduce, filter
- Pure Functions, Side Effects, State Mutation and Event Propagation
- Closures
- High Order Functions
- Recursion
- Collections and Generators
- Promises
- async/await
- Data Structures
- Expensive Operation and Big O Notation
- Algorithms
- Inheritance, Polymorphism and Code Reuse
- Design Patterns
- Partial Applications, Currying, Compose and Pipe
- Clean Code
1. Call Stack
A call stack is a mechanism for an interpreter (like the JavaScript interpreter in a web browser) to keep track of its place in a script that calls multiple functions β what function is currently being run and what functions are called from within that function, etc.
βSource
Tutorials
- π Understanding Javascript Call Stack, Event Loops β Gaurav Pandvia
- π Understanding the JavaScript Call Stack β Charles Freeborn
- π Javascript: What Is The Execution Context? What Is The Call Stack? β Valentino Gagliardi
2. Primitive Types
All types except objects define immutable values (that is, values which can't be changed). For example (and unlike in C), Strings are immutable. We refer to values of these types as "primitive values".
βSource
Tutorials
- π How numbers are encoded in JavaScript β Dr. Axel Rauschmayer
- π What You Need to Know About JavaScript Number Type β Max Wizard K
- π What Every JavaScript Developer Should Know About Floating Point Numbers β Chewxy
3. Value Types and Reference Types
Variables that are assigned a non-primitive value are given a reference to that value. That reference points to the objectβs location in memory. The variables donβt actually contain the value.
βSource
Tutorials
- π Explaining Value vs. Reference in Javascript β Arnav Aggarwal
- π Primitive Types & Reference Types in JavaScript β Bran van der Meer
- π Value Types, Reference Types and Scope in JavaScript β Ben Aston
4. Implicit, Explicit, Nominal, Structuring and Duck Typing
Type coercion means that when the operands of an operator are different types, one of them will be converted to an "equivalent" value of the other operand's type.
βSource
Tutorials
- π What you need to know about Javascript's Implicit Coercion β Promise Tochi
- π JavaScript Type Coercion Explained β Alexey Samoshkin
- π Javascript Coercion Explained β Ben Garrison
5. == vs === vs typeof
JavaScript has two visually similar, yet very different, ways to test equality. You can test equality with == or ===.
βSource
Tutorials
- π JavaScript Double Equals vs. Triple Equals β Brandon Morelli
- π Should I use === or == equality comparison operator in JavaScript? β Panu Pitkamaki
- π == vs === JavaScript: Double Equals and Coercion β AJ Meyghani
6. Function Scope, Block Scope and Lexical Scope
It is important to make this distinction because expressions can act like statements, which is why we also have Expression statements. Though, on other the hand, statements cannot act like expressions.
βSource
Tutorials
- π JavaScript FunctionsβUnderstanding The Basics β Brandon Morelli
- π The battle between Function Scope and Block Scope β Marius Herring
- π Emulating Block Scope in JavaScript β Josh Clanton
7. Expression vs Statement
It is important to make this distinction because expressions can act like statements, which is why we also have Expression statements. Though, on other the hand, statements cannot act like expressions.
βSource
Tutorials
- π All you need to know about Javascript's Expressions, Statements and Expression Statements β Promise Tochi
- π Function Expressions vs Function Declarations β Paul Wilkins
- π JavaScript Function β Declaration vs Expression β Ravi Roshan
8. IIFE, Modules and Namespaces
One of the often used coding patterns with functions has got a fancy name for itself: Immediately-invoked Function Expression. Or more dearly known as IIFE and pronounced as βiffy.β
βSource
Tutorials
- π Mastering Immediately-Invoked Function Expressions β Chandra Gundamaraju
- π Do ES6 Modules make the case of IIFEs obsolete?
- π A 10 minute primer to JavaScript modules, module formats, module loaders and module bundlers β Jurgen Van de Moere
9. Message Queue and Event Loop
βHow is JavaScript asynchronous and single-threaded ?β The short answer is that JavaScript language is single-threaded and the asynchronous behaviour is not part of the JavaScript language itself, rather they are built on top of the core JavaScript language in the browser (or the programming environment) and accessed through the browser APIs.
βSource
Tutorials
- π JavaScript Event Loop Explained β Anoop Raveendran
- π The JavaScript Event Loop: Explained β Erin Sweson-Healey
- π Understanding JS: The Event Loop β Alexander Kondov
10. setTimeout, setInterval and requestAnimationFrame
We may decide to execute a function not right now, but at a certain time later. Thatβs called βscheduling a callβ.
βSource
Tutorials
- π setTimeout and setInterval β JavaScript.Info
- π Why not to use setInterval β Akanksha Sharma
- π setTimeout VS setInterval β Develoger
11. JavaScript Engines
Writing code for the Web sometimes feels a little magical in that developers write a sequence of characters and like magic, those characters turn into concrete images, words, and actions within a browser. Understanding the technology can help developers better tune their craft as programmers.
βSource
Tutorials
- π JavaScript Engines β Jen Looper
- π Understanding How the Chrome V8 Engine Translates JavaScript into Machine Code β DroidHead
- π Understanding V8βs Bytecode β Franziska Hinkelmann
12. Bitwise Operators, Type Arrays and Array Buffers
Okay, so technically for the computer everything goes down to 1s and 0s. It does not operate with digits or characters or strings, it uses only binary digits (bits). The short version of this explanation is that everything is stored in binary form. Then the computer uses encodings such as UTF-8 to map the saved bit combinations to characters, digits or different symbols (the ELI5 version).
βSource
Tutorials
- π Programming with JS: Bitwise Operations β Alexander Kondov
- π Using JavaScriptβs Bitwise Operators in Real Life β ian m
- π JavaScript Bitwise Operators β w3resource
13. DOM and Layout Trees
The Document Object Model, usually referred to as the DOM, is an essential part of making websites interactive. It is an interface that allows a programming language to manipulate the content, structure, and style of a website. JavaScript is the client-side scripting language that connects to the DOM in an internet browser.
βSource
Tutorials
- π How To Understand and Modify the DOM in JavaScript β Tania Rascia
- π Whatβs the Document Object Model, and why you should know how to use it β Leonardo Maldonado
- π JavaScript DOM Tutorial with Example β Guru99
14. Factories and Classes
JavaScript is a prototype-based language, meaning object properties and methods can be shared through generalized objects that have the ability to be cloned and extended. This is known as prototypical inheritance and differs from class inheritance.
βSource
Tutorials
- π How To Use Classes in JavaScript β Tania Rascia
- π Javascript Classes β Under The Hood β Majid
- π ES6 Classes β Nathaniel Foster
15. this, call, apply and bind
These functions are very important for every JavaScript Developer and are used in almost every JavaScript Library or Framework.
βSource
Tutorials
- π Grokking call(), apply() and bind() methods in JavaScript β Aniket Kudale
- π How-to: call() , apply() and bind() in JavaScript β Niladri Sekhar Dutta
- π JavaScriptβs Apply, Call, and Bind Methods are Essential for JavaScript Professionals β Richard Bovell
16. new, Constructor, instanceof and Instances
Every JavaScript object has a prototype. All objects in JavaScript inherit their methods and properties from their prototypes.
βSource
Tutorials
- π JavaScript For Beginners: the βnewβ operator β Brandon Morelli
- π Letβs demystify JavaScriptβs βnewβ keyword β Cynthia Lee
- π Constructor, operator "new" β JavaScript.Info
17. Prototype Inheritance and Prototype Chain
JavaScript is a bit confusing for developers experienced in class-based languages (like Java or C++), as it is dynamic and does not provide a class implementation per se (the class keyword is introduced in ES2015, but is syntactical sugar, JavaScript remains prototype-based).
βSource
Tutorials
- π Javascript : Prototype vs Class β Valentin PARSY
- π JavaScript engine fundamentals: optimizing prototypes β Mathias Bynens
- π JavaScript Prototype β NC Patro
18. Object.create and Object.assign
The Object.create method is one of the methods to create a new object in JavaScript.
βSource
Tutorials
- π Object.create in JavaScript β Rupesh Mishra
- π Object.create(): the New Way to Create Objects in JavaScript β Rob Gravelle
- π Basic Inheritance with Object.create β Joshua Clanton
19. map, reduce, filter
Even if you donβt know what functional programming is youβve probably been using map, filter and reduce just because theyβre so incredibly useful and make your code stink less by allowing you to write cleaner logic.
βSource
Tutorials
- π JavaScript Functional Programming β map, filter and reduce β Bojan Gvozderac
- π Learn map, filter and reduce in Javascript β JoΓ£o Miguel Cunha
- π JavaScriptβs Map, Reduce, and Filter β Dan Martensen
20. Pure Functions, Side Effects, State Mutation and Event Propagation
So many of our bugs are rooted in IO related, data mutation, side effect bearing code. These creep up all over our code baseβfrom things like accepting user inputs, receiving an unexpected response via an http call, or writing to the file system. Unfortunately, this is a harsh reality that we should grow accustomed to dealing with. Or is it?
βSource
Tutorials
- π Javascript and Functional Programming β Pure Functions β Omer Goldberg
- π Master the JavaScript Interview: What is a Pure Function? β Eric Elliott
- π JavaScript: What Are Pure Functions And Why Use Them? β James Jeffery
21. Closures
A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time.
βSource
Tutorials
- π I never understood JavaScript closures β Olivier De Meulder
- π Understand JavaScript Closures With Ease β Richard Bovell
- π Understanding JavaScript Closures β Codesmith
22. High Order Functions
JavaScript can accept higher-order functions. This ability to handle higher-order functions, among other characteristics, makes JavaScript one of the programming languages well-suited for functional programming.
βSource
Tutorials
- π Higher-Order Functions in JavaScript β M. David Green
- π Higher Order Functions: Using Filter, Map and Reduce for More Maintainable Code β Guido Schmitz
- π First-class and Higher Order Functions: Effective Functional JavaScript β Hugo Di Francesco
23. Recursion
Consider this post as a series of learning exercises. These examples are designed to make you think β and, if Iβm doing it right, maybe expand your understanding of functional programming a little bit.
βSource
Tutorials
- π Recursion in JavaScript β Kevin Ennis
- π Understanding Recursion in JavaScript β Zak Frisch
- π Learn and Understand Recursion in JavaScript β Brandon Morelli
24. Collections and Generators
The Generator object is returned by a generator function and it conforms to both the iterable protocol and the iterator protocol.
βSource
Tutorials
- π ES6 In Depth: Collections β Jason Orendorff
- π ES6 Collections: Using Map, Set, WeakMap, WeakSet β Kyle Pennell
- π ES6 WeakMaps, Sets, and WeakSets in Depth β NicolΓ‘s Bevacqua
25. Promises
The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
βSource
Tutorials
- π JavaScript Promises for Dummies β Jecelyn Yeen
- π Understanding promises in JavaScript β Gokul N K
- π Master the JavaScript Interview: What is a Promise? β Eric Elliott
26. async/await
Thereβs a special syntax to work with promises in a more comfortable fashion, called βasync/awaitβ. Itβs surprisingly easy to understand and use.
βSource
Tutorials
- π Understanding async/await in Javascript β Gokul N K
- π Exploring Async/Await Functions in JavaScript β Alligator.io
- π Asynchronous Javascript using async/await β Joy Warugu
27. Data Structures
Javascript is evolving each day. With the rapid growth of frameworks and platforms like React, Angular, Vue, NodeJS, Electron, React Native, it has become quite common to use javascript for large-scale applications.
βSource
Tutorials
- π Data Structures in JavaScript β Thon Ly
- π Algorithms and Data Structures in JavaScript β Oleksii Trekhleb
- π Data Structures: Objects and Arrays β Chris Nwamba
28. Expensive Operation and Big O Notation
βWhat is Big O Notation?β that is a very common job interview question for developers. In short, it is the mathematical expression of how long an algorithm takes to run depending on how long is the input, usually talking about the worst case scenario.
βSource
Tutorials
- π Big O Notation in Javascript β CΓ©sar AntΓ³n Dorantes
- π Time Complexity/Big O Notation β Tim Roberts
- π Big O in JavaScript β Gabriela Medina
29. Algorithms
In mathematics and computer science, an algorithm is a finite sequence of well-defined instructions, typically used to solve a class of specific problems or to perform a computation.
Tutorials
- π Data Structures and Algorithms using ES6
- π Algorithms and data structures implemented in JavaScript with explanations and links to further readings
- π JS: Interview Algorithm
30. Inheritance, Polymorphism and Code Reuse
Class inheritance is a way for one class to extend another class, so we can create new functionality on top of the existing.
βSource
Tutorials
- π Inheritance in JavaScript β Rupesh Mishra
- π Simple Inheritance with JavaScript β David Catuhe
- π JavaScript β Inheritance, delegation patterns and Object linking β NC Patro
31. Design Patterns
Every developer strives to write maintainable, readable, and reusable code. Code structuring becomes more important as applications become larger. Design patterns prove crucial to solving this challenge - providing an organization structure for common issues in a particular circumstance.
βSource
Tutorials
- π 4 JavaScript Design Patterns You Should Know β Devan Patel
- π JavaScript Design Patterns β Beginner's Guide to Mobile Web Development β Soumyajit Pathak
- π JavaScript Design Patterns β Akash Pal
32. Partial Applications, Currying, Compose and Pipe
Function composition is a mechanism of combining multiple simple functions to build a more complicated one.
βSource
Tutorials
- π Use function composition in JavaScript β RΓ©mi
- π Currying in JavaScript ES6 β Adam Bene
- π Composition and Currying Elegance in JavaScript β Pragyan Das
33. Clean Code
Writing clean, understandable, and maintainable code is a skill that is crucial for every developer to master.
βSource
Tutorials
- π Clean Code Explained β A Practical Introduction to Clean Coding for Beginners β freeCodeCamp
- π Clean Code concepts adapted for JavaScript β Ryan McDermott
- π Clean Code Practice: How to write clean code β Tirth Bodawala
If you found this list useful, donβt forget to bookmark it and to follow me for more content like this.
[Deleted User]
Top comments (16)
Nice!
β€οΈ
Can I translate it into Chinese? I will indicate the original link.
yep!
Very nice selection!
Thanks! π€
A nice collection BUT.
Please carefully check your links and resources. I will dismiss any applicant that uses var or iffies without a very good reason. Articles that aim to extend knowledge should not use outdated syntax and especially not promote obsolete/legacy practices. The links regarding Design patterns are so outdated you could run them in IE6.
PLEASE don't promote legacy practices. Junior developers come here to seek best practices. These links teach ancient history.
Hi, Good point! They probably reused an old post...
Nice Selection!
Cool!
Very nicely explained!
Oh wow. This is pretty impressive, thanks for your hard work!
Cool! :)
Thank you for your post!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.