Skip to content

Divyamsharma-18/Javascript-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Course Repository 🎉

Welcome to the JavaScript Course Repository! This repository contains code snippets and examples for learning core JavaScript concepts. Each topic is organized sequentially for a smooth learning experience.


📚 Topics Covered

This repository covers essential JavaScript topics with simple and well-documented code examples:

  1. Arithmetic Operations
    Learn basic arithmetic operations like addition, subtraction, multiplication, and division.
    File: 1. Arithmetic.js

  2. If-Else Statements
    Understand conditional statements to control the flow of your program.
    File: 2. If Else.js

  3. For Loops
    Master iterative programming with for loops.
    File: 3. For Loop.js

  4. While Loops
    Explore how while loops work for repetitive tasks with condition checks.
    File: 4. While Loop.js

  5. Do-While Loops
    Discover how do-while loops ensure code runs at least once before condition checks.
    File: 5. Do While Loop.js

  6. 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

  7. Var and Confirm
    Understand the use of var and how to implement confirm dialogs for user interaction.
    File: 7. Var and Confirm.js

  8. Data Types Introduction
    Introduction to JavaScript's data types, including primitives and reference types.
    File: 8. Data Types Introduction.js

  9. Difference between '==' and '==='
    Learn the key differences between loose equality (==) and strict equality (===) in JavaScript.
    File: 9. Difference between '==' and '==='.js

  10. Function Basics
    Get started with JavaScript functions, including declaration, invocation, and parameters.
    File: 10. Function Basics.js

  11. Function Arithmetic
    Understand how to perform arithmetic operations within functions and return results.
    File: 11. Function Arithmetic.js

  12. Arrow Functions
    Learn the modern syntax for writing concise functions with arrow functions (=>).
    File: 12. Arrow Function.js

  13. Typeof
    Explore how the typeof operator is used to check data types in JavaScript.
    File: 13. Typeof.js

  14. String Basics and Manipulation
    Dive into string operations like concatenation, slicing, and methods for manipulation.
    File: 14. String Basics and Manipulation.js

  15. 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

  16. Array Basics
    Explore how to work with arrays, including creation, accessing elements, and common operations.
    File: 16. Array.js

  17. 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

  18. Map
    Understand how to use the Map object in JavaScript for key-value pair operations and efficient lookups.
    File: 17. Map.js

  19. Filter
    Learn how to use the filter method to create a new array containing elements that meet specific conditions.
    File: 18. Filter.js

  20. Reduce
    Master the reduce method to execute a reducer function on each array element, resulting in a single output value.
    File: 19. Reduce.js

  21. Alert
    Explore how to use the alert method to display pop-up messages to users in the browser.
    File: 20. Alert.js

  22. Confirm
    Learn how to use the confirm method to prompt users with a confirmation dialog and handle their responses.
    File: 23. Confirm.js

  23. Math.random()
    Learn how to use Math.random() to generate random numbers and implement randomness in your JavaScript programs.
    File: 21. Math.random().js

  24. DOM Basics
    Understand the Document Object Model (DOM) and learn how to interact with HTML elements using JavaScript.
    File: 22. DOM Basics.js

  25. 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

  26. Table in DOM
    Learn how to view HTML tables using JavaScript, including adding rows, columns, and dynamic data.
    File: 25. Table in DOM.js

  27. 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

  28. 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

  29. 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

  30. 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

  31. 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


🚀 How to Use

  1. Clone the repository:
    git clone https://github.com/Divyamsharma-18/Javascript-Code.git  
  2. Open any .js file in your preferred code editor, such as Visual Studio Code.
  3. Run the code in your browser console or using Node.js:
    node "1. Arithmetic.js"  
  4. Experiment with the code and modify it to deepen your understanding!

🛠️ Prerequisites

  • Basic knowledge of programming concepts is helpful but not required.
  • A code editor like Visual Studio Code.
  • Node.js (optional) for running JavaScript locally.

🤝 Contributions

Contributions are welcome! If you'd like to:

  • Add more examples or topics.
  • Fix bugs or improve code clarity.
  • Suggest improvements or provide feedback.

Feel free to open an issue or submit a pull request. Every contribution is appreciated, no matter how small.


📧 Contact

If you have any questions, suggestions, or feedback, feel free to connect with me:


🤗 Thanks for Visiting!

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published