Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Misba0019/JavaScript_basics

Repository files navigation

JavaScript Basics

Description

This repository covers fundamental concepts of JavaScript, providing a solid foundation for any beginner to start their JavaScript journey.


Topics

  1. Arrays
    Arrays are used to store multiple values in a single variable.
  • This section covers array basics and array methods.
  1. DOM (Document Object Model)
    The DOM represents a webpage so that programs can change the document structure, style, and content.
  • This section covers DOM manipulation techniques including selecting elements, changing styles, adding event listeners, handling form inputs, and modifying the DOM.
  1. Events
    Events are actions that occur when the user interacts with the webpage.
  • This section covers DOM events, form events, the this keyword, and more.
  1. Functions
    Functions are reusable blocks of code that perform specific tasks and can be called with different inputs. They help organize code and improve efficiency.
  • This section covers function declarations, expressions, higher-order functions, and factory functions.
  • Learn about scope, async functions, and more.
  1. Loops
    Loops execute code repeatedly.
  • This section covers for, for...of, for...in, and while loops.
  • Learn to iterate over arrays, strings, nested arrays, and objects using practical examples to calculate totals and averages.
  1. Objects
    Objects are collections of key-value pairs and are fundamental to JavaScript programming.
  • This section covers declaring and initializing objects, using const with objects, accessing object properties using dot and bracket notation, working with numeric keys, and using variables to access properties.
  • Additionally, it includes examples of nested arrays and objects, as well as accessing nested object properties.
  • Learn how to create, manipulate, and traverse objects effectively.
  1. Operators
    Operators are symbols used to perform operations on values and variables. They help in calculations and decision-making. This section includes:
  • Arithmetic Operators:

    • Addition (+): Adds two values.
    • Subtraction (-): Subtracts one value from another.
    • Multiplication (*): Multiplies two values.
    • Division (/): Divides one value by another.
    • Modulus (%): Returns the remainder of a division.
  • Logical Operators

    • AND (&&): Checks if both conditions are true.
    • OR (||): Checks if at least one condition is true.
    • NOT (!): Checks if a condition is false.
  1. AJAX & APIs
    AJAX (Asynchronous JavaScript and XML) has evolved into AJAJ (Asynchronous JavaScript and JSON).
  • This section covers making HTTP requests using JSON, parsing JSON data, and interacting with web-based APIs.
  • Learn how to convert JSON strings to JavaScript objects using JSON.parse, handle sample JSON data, and use reviver functions.
  • Explore examples of using modern tools and techniques to efficiently share data between systems over the internet.
  1. Asynchronous Programming in JavaScript (async/await)
    Asynchronous programming is essential for improving the performance and responsiveness of web applications.
  • This section covers the use of setTimeout, Promises, async/await, and handling asynchronous operations.
  • You'll learn how to manage the call stack, avoid callback hell, and chain Promises.
  • Examples include functions for changing colors sequentially using Promises, handling fake HTTP requests with callbacks and Promises, and visualizing the call stack using tools like Chrome DevTools and Loupe.
  1. Classes
    Classes are templates for creating objects in JavaScript.
  • This section explains how to define and use classes with constructors, properties, and methods.
  • You'll learn how to create instances of a class and use methods such as rgb(), hex(), rgba(), hsl(), fullSaturation(), and opposite().
  • The examples include converting colors between RGB, HEX, RGBA, and HSL formats, calculating HSL values, and styling HTML elements with these color instances.
  • Explore how classes encapsulate functionality and make your code more modular and reusable.
  1. JavaScript ES6: Understanding extends & super
    The extends keyword is used to create a class that is a child of another class. The super keyword is used to access properties and methods of the parent class.
  • This section covers inheritance in JavaScript.
  1. Making HTTP Requests
    Learn how to make HTTP requests using fetch, axios, and XML API methods to interact with web servers.

  2. Async Operations with setTimeout & setInterval
    These functions are used to execute code after a set period or repeatedly at specified intervals.

  • This section covers how to use them effectively.
  1. Truthy & Falsy Values Understanding truthy and falsy values is crucial for writing accurate conditional statements.
  • This section explains what values are considered truthy or falsy in JavaScript.
  1. Exception Handling Mechanisms: Try & Catch
    Error handling is an essential part of programming.
  • Learn how to handle errors using try and catch blocks.
  1. Variables & Data Types
    Variables store data values and are declared using var, let, or const. Data types determine the kind of data a variable can hold.
  • This section includes files on declaring variables, primitive data types, and type conversion.

How to Use

  1. Clone the repository:
git clone https://github.com/Misba0019/JavaScript_basics.git
  1. Navigate to the project folder:
cd JavaScript_basics
  1. Open the files in a browser:
    Open any of the .html files in your browser to view the examples.

  2. Explore the Code:
    Open the .js files in a code editor (e.g., VS Code) to review the JavaScript code.

OR

  1. Run the Code Locally:
    For interactive examples, open the browser's developer console to see the output of the JavaScript code.

Support

⭐ If you find this project helpful, please consider visiting the repo and giving it a ⭐ star — it really helps!

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published