/SelfLearningJavascript

Welcome to our open source repository for self-learning JavaScript! Whether you're just starting out or aiming to enhance your skills, "SelfLearningJs" provides a comprehensive collection of JavaScript code snippets, explanations, and exercises to guide you through mastering this versatile programming language.

SelfLearningJavascript

Welcome to "SelfLearningJs," an open-source repository dedicated to helping developers of all levels master JavaScript. Whether you're a beginner or an experienced developer, this repository provides a comprehensive collection of exercises and projects to help you enhance your JavaScript skills.

How to Use This Repository

  1. Clone the repository to your local machine:

    git clone https://github.com/aymanebenhima/SelfLearningJavascript.git
    
  2. Navigate to the directory:

    cd SelfLearningJs
    
  3. Choose the section you want to explore:

    • Fundamentals: Perfect for understanding basic JavaScript concepts.
    • Beginner: Entry-level exercises suitable for beginners.
    • Intermediate: Intermediate-level exercises to deepen your understanding.
    • Advanced: Challenging exercises for experienced developers.
    • Projects: Real-world projects to apply your skills.
  4. Start coding! Open the exercises or projects in your preferred code editor and begin practicing JavaScript.

Fundamentals

This section covers essential JavaScript concepts to build a strong foundation:

  • Variables and data types
  • Operators
  • Control flow (if statements, loops)
  • Functions
  • Arrays and objects

Beginner

Get started with these beginner-friendly exercises to practice basic JavaScript skills:

  1. Print "Hello, World!" to the console.
  2. Calculate the sum of two numbers.
  3. Create a function to check if a number is even or odd.
  4. Reverse a string.
  5. Find the largest element in an array.
  6. Write a function to find the maximum and minimum elements in an array.
  7. Create a function to check if a given year is a leap year.
  8. Implement a function to reverse words in a sentence.
  9. Write a program to calculate the factorial of a given number using recursion.
  10. Create a function to capitalize the first letter of each word in a sentence.
  11. Write a function to find the sum of all numbers in a given array.
  12. Create a program to check if a given number is a palindrome.
  13. Implement a function to count the number of vowels in a string.
  14. Write a program to remove all duplicates from an array.
  15. Create a function to check if a string contains only alphanumeric characters.
  16. Implement a function to check if a given string is a valid email address format.
  17. Create a function to check if a given string is a valid hexadecimal color code.
  18. Write a function to convert a temperature from Celsius to Fahrenheit and vice versa.
  19. Implement a function to generate a random password of a specified length with alphanumeric characters and symbols.
  20. Create a program to find the missing number in a given integer array containing numbers from 1 to n.

Intermediate

Deepen your understanding with these intermediate-level exercises:

  1. Write a function to find the factorial of a number.
  2. Implement a function to check for a prime number.
  3. Sort an array of integers in ascending order.
  4. Create a function to remove duplicate elements from an array.
  5. Implement a basic calculator with addition, subtraction, multiplication, and division operations.
  6. Implement a function to find the second largest element in an array.
  7. Write a program to check if a given string is a palindrome ignoring spaces and punctuation.
  8. Create a function to find the intersection of two arrays.
  9. Implement a function to check if a given number is a perfect number.
  10. Write a program to find the longest word in a sentence.
  11. Implement a function to merge two sorted arrays into a single sorted array.
  12. Write a program to find the longest common prefix among an array of strings.
  13. Create a function to flatten a nested array.
  14. Implement a function to rotate elements of an array to the left by a given number of positions.
  15. Write a program to check if a given string is an anagram of another string.
  16. Write a program to find the intersection of two sorted arrays.
  17. Implement a function to find the kth smallest element in an unsorted array.
  18. Write a program to check if a given string is a valid IPv4 address.
  19. Create a function to shuffle an array randomly.

Advanced

Challenge yourself with these advanced exercises:

  1. Implement a binary search algorithm.
  2. Create a function to check for palindrome phrases.
  3. Implement a sorting algorithm (e.g., QuickSort, MergeSort).
  4. Write a function to generate Fibonacci sequence up to a specified number.
  5. Implement a function to reverse a linked list.
  6. Create a function to find the longest common subsequence between two strings.
  7. Implement a function to perform a depth-first search (DFS) on a graph.
  8. Write a program to validate a Sudoku puzzle solution.
  9. Create a function to find the nth prime number.
  10. Implement a function to perform matrix multiplication.
  11. Create a function to calculate the nth Fibonacci number using memoization.
  12. Implement a function to perform a binary search on a sorted array.
  13. Write a program to find the longest increasing subsequence in an array.
  14. Create a function to compute the power of a number efficiently using recursion.
  15. Implement a function to solve the Tower of Hanoi puzzle.
  16. Create a function to check if a given string is a valid JSON format.
  17. Write a function to generate a random permutation of elements in an array.
  18. Implement a function to convert a Roman numeral to an integer.
  19. Implement a function to perform a breadth-first search (BFS) on a graph.

Projects

Apply your skills to real-world projects:

  1. To-Do List Application
  2. Weather App using an API
  3. Simple Blogging Platform
  4. E-commerce Website
  5. Portfolio Website

Feel free to contribute your solutions to the exercises or add new projects to the repository. Happy coding!