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.
-
Clone the repository to your local machine:
git clone https://github.com/aymanebenhima/SelfLearningJavascript.git
-
Navigate to the directory:
cd SelfLearningJs
-
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.
-
Start coding! Open the exercises or projects in your preferred code editor and begin practicing JavaScript.
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
Get started with these beginner-friendly exercises to practice basic JavaScript skills:
- Print "Hello, World!" to the console.
- Calculate the sum of two numbers.
- Create a function to check if a number is even or odd.
- Reverse a string.
- Find the largest element in an array.
- Write a function to find the maximum and minimum elements in an array.
- Create a function to check if a given year is a leap year.
- Implement a function to reverse words in a sentence.
- Write a program to calculate the factorial of a given number using recursion.
- Create a function to capitalize the first letter of each word in a sentence.
- Write a function to find the sum of all numbers in a given array.
- Create a program to check if a given number is a palindrome.
- Implement a function to count the number of vowels in a string.
- Write a program to remove all duplicates from an array.
- Create a function to check if a string contains only alphanumeric characters.
- Implement a function to check if a given string is a valid email address format.
- Create a function to check if a given string is a valid hexadecimal color code.
- Write a function to convert a temperature from Celsius to Fahrenheit and vice versa.
- Implement a function to generate a random password of a specified length with alphanumeric characters and symbols.
- Create a program to find the missing number in a given integer array containing numbers from 1 to n.
Deepen your understanding with these intermediate-level exercises:
- Write a function to find the factorial of a number.
- Implement a function to check for a prime number.
- Sort an array of integers in ascending order.
- Create a function to remove duplicate elements from an array.
- Implement a basic calculator with addition, subtraction, multiplication, and division operations.
- Implement a function to find the second largest element in an array.
- Write a program to check if a given string is a palindrome ignoring spaces and punctuation.
- Create a function to find the intersection of two arrays.
- Implement a function to check if a given number is a perfect number.
- Write a program to find the longest word in a sentence.
- Implement a function to merge two sorted arrays into a single sorted array.
- Write a program to find the longest common prefix among an array of strings.
- Create a function to flatten a nested array.
- Implement a function to rotate elements of an array to the left by a given number of positions.
- Write a program to check if a given string is an anagram of another string.
- Write a program to find the intersection of two sorted arrays.
- Implement a function to find the kth smallest element in an unsorted array.
- Write a program to check if a given string is a valid IPv4 address.
- Create a function to shuffle an array randomly.
Challenge yourself with these advanced exercises:
- Implement a binary search algorithm.
- Create a function to check for palindrome phrases.
- Implement a sorting algorithm (e.g., QuickSort, MergeSort).
- Write a function to generate Fibonacci sequence up to a specified number.
- Implement a function to reverse a linked list.
- Create a function to find the longest common subsequence between two strings.
- Implement a function to perform a depth-first search (DFS) on a graph.
- Write a program to validate a Sudoku puzzle solution.
- Create a function to find the nth prime number.
- Implement a function to perform matrix multiplication.
- Create a function to calculate the nth Fibonacci number using memoization.
- Implement a function to perform a binary search on a sorted array.
- Write a program to find the longest increasing subsequence in an array.
- Create a function to compute the power of a number efficiently using recursion.
- Implement a function to solve the Tower of Hanoi puzzle.
- Create a function to check if a given string is a valid JSON format.
- Write a function to generate a random permutation of elements in an array.
- Implement a function to convert a Roman numeral to an integer.
- Implement a function to perform a breadth-first search (BFS) on a graph.
Apply your skills to real-world projects:
- To-Do List Application
- Weather App using an API
- Simple Blogging Platform
- E-commerce Website
- Portfolio Website
Feel free to contribute your solutions to the exercises or add new projects to the repository. Happy coding!