SHEKHOBABA.
COM 2024
JS Concepts
You Should Know
Burhan Tahir
@iamshekhobaba
2024
In JavaScript, scope defines the
accessibility of variables, objects, and
functions within the code. It includes
three types:
Block Scope – Variables declared with
let or const inside a block are
accessible only within that block.
Function Scope – Variables declared
inside a function are only accessible
within that function.
Global Scope – Variables declared
outside any function or block are
accessible throughout the entire code.
Burhan Tahir
@iamshekhobaba
2024
Functions that retain access to their
own, outer function, and global
scope, enabling data encapsulation
and preserving environment even
after outer functions complete.
Burhan Tahir
@iamshekhobaba
2024
Allows handling tasks like data
fetching in JavaScript’s single-
threaded environment. Promises
manage async tasks, while
async/await simplifies asynchronous
code to appear synchronous.
Burhan Tahir
@iamshekhobaba
2024
Hoisting moves declarations to the
top of the scope, affecting variable
accessibility and behavior.
Burhan Tahir
@iamshekhobaba
2024
Manages JavaScript’s non-blocking
execution by coordinating the call
stack and callback queue, letting
async tasks run in the background
while main code proceeds.
Burhan Tahir
@iamshekhobaba
2024
Functions that take or return other
functions, like map, filter, and reduce,
making array transformations and
data processing efficient.
Burhan Tahir
@iamshekhobaba
2024
Refers to the current context, which
varies with how a function is called.
Understanding this is crucial in object
methods, constructors, and
callbacks.
Burhan Tahir
@iamshekhobaba
[Link]
DO YOU WANT MOBILE
APP OR WEBSITE FOR
YOUR BUSINESS?
FOLLOW ME
FOLLOW ME