Wednesday, August 17, 2022

33 JavaScript Concepts Every Developer Should Know

Homeprogramming33 JavaScript Concepts Every Developer Should Know

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.

1. Call Stack

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

2. Primitive Types

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

3. Value Types and Reference Types

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

4. Implicit, Explicit, Nominal, Structuring and Duck Typing

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

5. == vs === vs typeof

== vs === vs typeof

JavaScript has two visually similar, yet very different, ways to test equality. You can test equality with == or ===.
Source

Tutorials

6. Function Scope, Block Scope and Lexical Scope

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

7. Expression vs Statement

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

8. IIFE, Modules and Namespaces

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

9. Message Queue and Event Loop

GIFMessage queue

“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

10. setTimeout, setInterval and requestAnimationFrame

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

CHECK MORE IN
RELATED ARTICLES

READ ABOUT