This repository covers essential JavaScript topics with simple and well-documented code examples:
-
Arithmetic Operations
Learn basic arithmetic operations like addition, subtraction, multiplication, and division.
File: 1. Arithmetic.js
-
If-Else Statements
Understand conditional statements to control the flow of your program.
File: 2. If Else.js
-
For Loops
Master iterative programming with for loops.
File: 3. For Loop.js
-
While Loops
Explore how while loops work for repetitive tasks with condition checks.
File: 4. While Loop.js
-
Do-While Loops
Discover how do-while loops ensure code runs at least once before condition checks.
File: 5. Do While Loop.js
-
For-of Loop
Learn how to iterate over iterable objects like arrays and strings using the for-of loop.
File: 6. For-of loop.js
-
Var and Confirm
Understand the use of var and how to implement confirm dialogs for user interaction.
File: 7. Var and Confirm.js
-
Data Types Introduction
Introduction to JavaScript's data types, including primitives and reference types.
File: 8. Data Types Introduction.js
-
Difference between '==' and '==='
Learn the key differences between loose equality (==) and strict equality (===) in JavaScript.
File: 9. Difference between '==' and '==='.js
-
Function Basics
Get started with JavaScript functions, including declaration, invocation, and parameters.
File: 10. Function Basics.js
-
Function Arithmetic
Understand how to perform arithmetic operations within functions and return results.
File: 11. Function Arithmetic.js
-
Arrow Functions
Learn the modern syntax for writing concise functions with arrow functions (=>).
File: 12. Arrow Function.js
-
Typeof
Explore how the typeof operator is used to check data types in JavaScript.
File: 13. Typeof.js
-
String Basics and Manipulation
Dive into string operations like concatenation, slicing, and methods for manipulation.
File: 14. String Basics and Manipulation.js
-
String Methods Example
Learn how to use various built-in JavaScript string methods like toLowerCase(), length, slice, concat, trim, indexOf, toUpperCase(), and replace().
File: 15. String Methods Example.js
-
Array Basics
Explore how to work with arrays, including creation, accessing elements, and common operations.
File: 16. Array.js
-
Array Methods
Explore essential array methods in JavaScript, including: toString(), join(), pop(), push(), shift(), unshift(), delete, concat(), sort(), compare, reverse(), splice(), slice().
File: 26. Array Methods.js
-
Map
Understand how to use the Map object in JavaScript for key-value pair operations and efficient lookups.
File: 17. Map.js
-
Filter
Learn how to use the filter method to create a new array containing elements that meet specific conditions.
File: 18. Filter.js
-
Reduce
Master the reduce method to execute a reducer function on each array element, resulting in a single output value.
File: 19. Reduce.js
-
Alert
Explore how to use the alert method to display pop-up messages to users in the browser.
File: 20. Alert.js
-
Confirm
Learn how to use the confirm method to prompt users with a confirmation dialog and handle their responses.
File: 23. Confirm.js
-
Math.random()
Learn how to use Math.random() to generate random numbers and implement randomness in your JavaScript programs.
File: 21. Math.random().js
-
DOM Basics
Understand the Document Object Model (DOM) and learn how to interact with HTML elements using JavaScript.
File: 22. DOM Basics.js
-
Child Element
Understand how to access and manipulate child elements in the DOM using properties like children, firstChild, and lastChild.
File: 24. Child Element.js
-
Table in DOM
Learn how to view HTML tables using JavaScript, including adding rows, columns, and dynamic data.
File: 25. Table in DOM.js
-
For Each Loop
Learn how to use the forEach method to iterate over array elements and execute a callback function on each item.
File: 27. For Each Loop.js
-
Console Objects
Explore various console object methods like console.log, console.warn, console.error, console.time, and more to debug and display information in the browser console.
File: 28. Console Objects.js
-
Element ID Classes Using Console
Learn how to access and manipulate HTML elements using their ID and Class selectors through the console with methods like getElementById and getElementsByClassName.
File: 29. Element ID Classes Using Console.js
-
Synchronous & Asynchronous
Understand the difference between synchronous and asynchronous programming in JavaScript, including concepts like the event loop, callbacks, promises, and async/await.
File: 30. Synchronous & Asynchronous.js
-
Query Selector
Learn how to use querySelector to select a single element and querySelectorAll to select multiple elements using CSS-style selectors in JavaScript.
File: 31. Query Selector.js
If you have any questions, suggestions, or feedback, feel free to connect with me:
Thank you for checking out this repository! I hope you find the examples and code helpful in your JavaScript learning journey. Feel free to explore the topics, contribute, or reach out with any questions. Happy coding!