Mind~G
Javascript

JS in one word

JS in one word

  • JS is a programming language that allows you to implement complex features on web pages.
๐Ÿง  Concept๐Ÿ˜ƒ Plain English Explanation
ClosureA function that remembers variables from its outer scope
HoistingJS moves declarations to the top of the file
Event LoopHandles async tasks behind the scenes (like setTimeout)
CallbackA function passed into another function to be called later
PromiseA value that will be available later (async placeholder)
async/awaitCleaner way to write async code instead of chaining .then()
CurryingBreak a function into smaller, chained functions
IIFEFunction that runs immediately after itโ€™s defined
PrototypeJSโ€™s way of sharing features across objects (object inheritance)
ThisRefers to the object currently calling the function
DebounceDelay a function until user stops typing or clicking
ThrottleLimit how often a function can run in a time frame
Lexical ScopeInner functions have access to outer function variables
Garbage CollectionJS automatically frees up unused memory
ShadowingA variable in a smaller scope overwrites one in a larger scope
Callback HellNesting many callbacks leads to messy code
Promise ChainingUsing .then() repeatedly to handle multiple async steps
Microtask QueueWhere promises get queued (after main code, before rendering)
Execution ContextThe environment in which JS runs each piece of code
Call StackA stack where function calls are managed
Temporal Dead ZoneTime between variable declaration and initialization with let/const
Type CoercionJS automatically converts types (e.g., "5" + 1 => "51")
Falsy ValuesValues treated as false (0, "", null, undefined, NaN, false)
Truthy ValuesValues treated as true ("a", [], 1, )
Short-circuitingJS skips the rest if result is already known (`true
Optional Chaining?. safely accesses deep properties without crashing
Nullish Coalescing?? gives first non-null/undefined value
Set & MapSet = unique values, Map = key-value pairs
Memory LeakWhen unused data stays in memory and slows the app
Event DelegationOne event listener handles many elements efficiently
ImmutabilityAvoid changing existing values โ€” return new ones instead
Spread Operator... to copy/expand arrays or objects
DestructuringQuickly extract values from arrays/objects
Rest Parameters...args collects all remaining arguments into one
typeofTells you the data type of a variable
instanceofChecks if an object belongs to a certain class/type
Reference vs ValueObjects/arrays are referenced, primitives are copied

On this page