This repository contains the my personal code notes for the JavaScript Beginning to Mastery course by Harshit Vashisth, a YouTube educator. The course covers various topics in JavaScript, starting from the basics and progressing towards more advanced concepts.
DISCLAIMER: File structure may be absurd, clumsy, and have multilingual comments that make it harder to understand.
- Hello world program
- Declare variable using
var
- More about variables
let
const
- String Indexing
- Useful string methods
- Template Strings
- Null, undefined, BigInt,
typeof
- Booleans and Comparison Operators
- Truthy and Falsy Values
- If-else statement
- Ternary Operator
- Logical Operators (
&&
,||
) - Nested if-else statements
- If-elseif-else statement
- Switch statement
- While loop
- While loop examples
- For loop
- For loop examples
- Break and continue keywords
- Do-while loop
- Introduction to arrays
- Push, pop, shift, unshift methods
- Primitive vs reference data types
- Clone array and spread operator
- For loop with arrays
- Using
const
to create arrays - While loop with arrays
- For...of loop
- For...in loop
- Array destructuring
- Introduction to objects
- Dot vs Bracket notation
- Iterating through objects
- Computed properties
- Spread operator in objects
- Object destructuring
- Objects inside an array
- Nested destructuring
- Function declaration
- Function expression
- Arrow functions
- Function declarations are hoisted
- Functions inside functions
- Lexical Scope
- Block Scope vs Function Scope
- Default parameters
- Rest parameters
- Parameter destructuring
- Brief introduction to callback functions
- Functions returning functions
forEach
methodmap
methodfilter
methodreduce
methodsort
methodfind
methodevery
methodsome
methodfill
methodsplice
method
- Iterables
- Sets
- Maps
Object.assign
- Optional chaining
- Methods
this
keyword and Window objectcall
,apply
, andbind
methods- Warnings
this
inside arrow functions- Short syntax for methods
- Factory functions and memory-related problems
- First solution and its limitations
__proto__
and[[prototype]]
- Prototype and
prototype
object - Using prototype
- The
new
keyword - Constructor function with
new
- More about
__proto__
andprototype
class
keyword- Example using
class
keyword super
keyword- Method overriding
- Getters and setters
- Static methods and properties
- Global Execution context
this
and Window in global execution context- Hoisting
- Are
let
andconst
hoisted? - What is a reference error?
- Function execution context
- Scope chain and lexical environment
- Introduction to closures
- Closure examples
- HTML and CSS Crash course
- Async vs defer
- Selecting elements using id
querySelector
textContent
andinnerText
- Changing styles of elements using JavaScript
- Getting and setting attributes
- Selecting multiple elements and looping through them
innerHTML
- Understanding the DOM tree, root node, element nodes, and text nodes
classList
- Adding new elements to the page
- Creating elements
- Inserting adjacent elements
- Cloning nodes
- More methods to add elements to the page
- Getting the dimensions of an element
- Introduction to events
this
keyword inside eventListener callback- Adding events to multiple elements
- Event object
- How event listeners work
- Practicing with events
- Creating a demo project
- More events
- Event bubbling
- Event capturing
- Event delegation
- Creating a project using event delegation
- Is JavaScript synchronous or asynchronous?
setTimeout()
setTimeout()
with 0 milliseconds- Callback Queue
setInterval()
and creating a project withsetInterval()
- Understanding callbacks in general
- Callbacks in asynchronous programming
- Callback Hell and Pyramid of doom
- Introduction to promises
- Microtask Queue
- Functions that return promises
- Promises and
setTimeout()
Promise.resolve()
and more about thethen()
method- Converting nested callbacks to flat code using promises
- Introduction to Ajax and HTTP Requests
- XHR requests
- Error handling in XHR requests
- XHR request chaining
- Promisifying XHR requests and chaining using
then()
- Fetch API
- Error handling in Fetch API
- Consuming promises with async and await
- Splitting code into multiple files using ES6 modules.
Special thanks to @harshitvee (Harshit Vashisth) for creating the "JavaScript Beginning to Mastery" course and providing valuable learning resources for the JavaScript community.