0% found this document useful (0 votes)
10 views

JS ShortList

Uploaded by

riyaf47328
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

JS ShortList

Uploaded by

riyaf47328
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Essential JavaScript Topics:

1. let:
• It's used for variable declaration within a block scope.
• Variables declared with let can be reassigned.
• let allows for more predictable behavior compared to var.
2. const:
• It's used for constant variable declaration within a block scope.
• Variables declared with const cannot be reassigned.
• const provides immutability, making it useful for declaring variables
that shouldn't change.
3. scope:
• Scope refers to the accessibility of variables within the code.
• JavaScript has global scope, function scope, and block scope.
• Variables declared with let and const have block scope, while variables
declared with var have function scope.
4. hoisting:
• Hoisting is a JavaScript mechanism where variable and function
declarations are moved to the top of their containing scope during the
compilation phase.
• However, only the declarations are hoisted, not the initializations.
5. strings:
• Strings are sequences of characters enclosed in single ('') or double
("") quotes.
• JavaScript provides various methods for working with strings, such as
length, charAt, toUpperCase, toLowerCase, etc.
6. numbers:
• Numbers can be integers or floating-point numbers in JavaScript.
• JavaScript supports arithmetic operations like addition, subtraction,
multiplication, division, etc., on numbers.
7. arrays (including array methods):
• Arrays are ordered collections of data, consisting of elements indexed by
contiguous integers.
• Array methods like push, pop, shift, unshift, splice, slice, map, filter,
reduce, etc., are used for manipulation.
8. objects:
• Objects are collections of key-value pairs, where keys are strings (or
symbols) and values can be any data type.
• Objects are used to represent complex data structures and are fundamental
in JavaScript.
9. destructuring:
• Destructuring allows extracting values from arrays or objects into
distinct variables.
• It provides a concise syntax for extracting multiple properties from an
object or elements from an array.
10.spread syntax:
• Spread syntax allows an iterable (e.g., array, string) to be expanded
into individual elements.
• It provides a concise way to merge arrays, create copies, or pass
multiple elements as arguments to functions.
11.template literals:
• Template literals allow embedding expressions (${expression}) and
multiline strings (string) in JavaScript.
• They provide a more readable and flexible way to create strings compared
to traditional string concatenation.
12.arrow functions:
• Arrow functions provide a concise syntax for defining functions in
JavaScript.
• They are especially useful for writing shorter and more readable code for
callback functions and function expressions.
13.anonymous functions:
• Anonymous functions are functions without a name.
• They are often used as function expressions or as arguments to other
functions.
14.loops:
• Loops are control flow structures used to execute a block of code
repeatedly until a specified condition is met.
• Common loop types in JavaScript include for, while, and do-while loops.
15.if, else if, else:
• Conditional statements are used to execute different blocks of code based
on specified conditions.
• if, else if, and else statements are used for handling multiple
conditions.
16.ternary operators:
• Ternary operators provide a concise syntax for conditional expressions.
• They consist of three operands: a condition followed by a '?' operator, a
value if the condition is true, and a ':' operator, a value if the
condition is false.
17.functions:
• Functions are reusable blocks of code that perform a specific task when
called or invoked.
• They encapsulate functionality, promote code reusability, and help in
organizing code into manageable units.
18.callback functions:
• Callback functions are functions passed as arguments to other functions
to be executed later, often asynchronously.
• They are commonly used in event handling, asynchronous programming, and
functional programming paradigms.
19.promises:
• Promises represent the eventual completion or failure of an asynchronous
operation and its resulting value.
• They provide a cleaner and more organized way to handle asynchronous code
compared to traditional callback-based approaches.
20.async/await:
• Async/await is a modern JavaScript feature that provides syntactic sugar
for working with promises in an asynchronous manner.
• It allows writing asynchronous code that resembles synchronous code,
making it easier to read, write, and maintain.
21.ES6 Modules:
• Modules are a standard mechanism for encapsulating and organizing
JavaScript code into reusable modules.
• They allow for better code organization, maintainability, and dependency
management in large-scale applications.
22.Event Handling:
• Event handling captures and responds to user actions, such as clicks or
keyboard inputs.
• It's essential for creating interactive web applications and handling
user interactions.
23.Closures:
• Closures are functions that retain access to variables from their
containing scope even after the scope has closed.
• They're formed when a function is defined within another function and has
access to the outer function's variables.

You might also like