Skip to main content

JavaScript

Key concepts:

  1. Variables: Containers for storing data values. Declared using var, let, or const.

  2. Data Types: JavaScript supports various data types including number, string, boolean, null, undefined, object, symbol, and bigint.

  3. Operators: Symbols that perform operations on variables and values, e.g., +, -, *, /, =, ==, ===, &&, ||, !, ?:.

  4. Control Structures: Statements that control the flow of execution in a program, including if, else, switch, for, while, do...while, break, and continue.

  5. Functions: Blocks of code designed to perform particular tasks, defined using the function keyword, arrow functions () => {}, or function expressions.

  6. Objects: Collections of properties and methods, where a property is an association between a key and a value.

  7. Arrays: List-like objects used to store multiple values in a single variable.

  8. Scope: The context in which variables and functions are accessible, including global scope and local scope (function scope and block scope).

  9. Closures: Functions that have access to their own scope, the scope of the outer function, and the global scope, even after the outer function has returned.

  10. Promises: Objects representing the eventual completion or failure of an asynchronous operation, providing then and catch methods.

  11. Async/Await: Syntax for working with promises more comfortably, allowing asynchronous code to be written in a synchronous style.

  12. Callbacks: Functions passed as arguments to other functions to be executed later, often used in asynchronous operations.

  13. Hoisting: The behavior of moving variable and function declarations to the top of their containing scope during the compile phase.

  14. Prototypes: Mechanism by which JavaScript objects inherit features from one another. Each object has a prototype, from which it can inherit properties and methods.

  15. Event Loop: The process that handles asynchronous callbacks in JavaScript, allowing non-blocking operations.

  16. Event Handling: The process of responding to user actions like clicks, form submissions, and keypresses, typically using event listeners.

  17. DOM (Document Object Model): An API for HTML and XML documents, providing a structured representation of the document and a way to manipulate its structure, style, and content.

  18. BOM (Browser Object Model): Interfaces provided by the browser for interacting with the browser window and its components, such as window, navigator, screen, location, and history.

  19. JSON (JavaScript Object Notation): A lightweight data interchange format, easy for humans to read and write, and easy for machines to parse and generate.

  20. Modules: Code organization technique allowing encapsulation and reusability, using import and export statements to manage dependencies between files.

  21. Error Handling: Techniques for managing errors using try, catch, finally, and throw statements.

  22. Strict Mode: A way to opt into a restricted variant of JavaScript by placing "use strict"; at the beginning of a script or function, helping to catch common coding errors and improve performance.

  23. This: A keyword that refers to the object from which the function was called, with behavior that varies depending on how the function is called.

  24. Arrow Functions: A shorter syntax for writing functions with implicit this binding, using () => {} syntax.

  25. Template Literals: String literals allowing embedded expressions, using backticks (`) and ${} syntax for interpolation.

  26. Destructuring: A syntax for extracting values from arrays or properties from objects into distinct variables.

  27. Spread Operator: ... syntax used to expand iterable objects into individual elements, useful in function calls, array literals, and object literals.

  28. Rest Parameters: ... syntax used to represent an indefinite number of arguments as an array, providing a way to handle function parameters.

  29. Classes: Syntactic sugar over JavaScript's existing prototype-based inheritance, using the class keyword to define constructor functions and methods.

  30. SetTimeout/SetInterval: Functions for executing code after a delay (setTimeout) or repeatedly at intervals (setInterval), useful for scheduling tasks.

  31. Regular Expressions (RegExp): Patterns used to match character combinations in strings, providing powerful tools for pattern matching and text manipulation.