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
letconst- 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
constto 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
forEachmethodmapmethodfiltermethodreducemethodsortmethodfindmethodeverymethodsomemethodfillmethodsplicemethod
- Iterables
- Sets
- Maps
Object.assign- Optional chaining
- Methods
thiskeyword and Window objectcall,apply, andbindmethods- Warnings
thisinside arrow functions- Short syntax for methods
- Factory functions and memory-related problems
- First solution and its limitations
__proto__and[[prototype]]- Prototype and
prototypeobject - Using prototype
- The
newkeyword - Constructor function with
new - More about
__proto__andprototype classkeyword- Example using
classkeyword superkeyword- Method overriding
- Getters and setters
- Static methods and properties
- Global Execution context
thisand Window in global execution context- Hoisting
- Are
letandconsthoisted? - 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
querySelectortextContentandinnerText- 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
thiskeyword 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.