-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreadme
62 lines (44 loc) · 3.24 KB
/
readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# JS Exercises Repository
This repository contains a collection of JavaScript exercises that help improve logical thinking and problem-solving skills. The exercises range from basic to advanced levels and are designed to challenge the user and provide a learning experience through coding practice.
## Table of Contents
- [Introduction](#introduction)
- [Exercises](#exercises)
- [Simple Exercises](#simple-exercises)
- [Intermediate Exercises](#intermediate-exercises)
- [Advanced Exercises](#advanced-exercises)
- [Contributing](#contributing)
- [License](#license)
## Introduction
This repository aims to provide a series of JavaScript exercises that can help developers, especially beginners and intermediate programmers, to practice and improve their problem-solving and logical thinking skills. The exercises are divided into categories based on difficulty and complexity, including:
- **Simple Exercises**: Basic tasks to get comfortable with JavaScript syntax and logic.
- **Intermediate Exercises**: Tasks that involve more complex problem-solving and algorithmic thinking.
- **Advanced Exercises**: Challenges that require higher-level understanding of JavaScript concepts and problem-solving skills.
## Exercises
### Simple Exercises
- **Print a message**: Write a function that takes a message as input and prints it to the console.
- **Sum of Two Numbers**: Write a function that takes two numbers as input and returns their sum.
- **Even or Odd**: Write a program that takes a number as input and determines if it is even or odd.
- **Celsius to Fahrenheit Conversion**: Write a function that converts Celsius temperature to Fahrenheit.
- **Reverse a String**: Write a program that reverses an input string.
### Intermediate Exercises
- **Factorial**: Write a recursive function to calculate the factorial of a given number.
- **Prime Number Check**: Write a program to check if a given number is prime.
- **Sum of Array Elements**: Write a function that returns the sum of all elements in an array.
- **Character Count**: Write a function that counts the occurrences of a specific character in a string.
- **Fibonacci Sequence**: Write a program to print a specific number of Fibonacci numbers.
### Advanced Exercises
- **Sum of Digits**: Write a function to find the sum of the digits of a given number.
- **Palindrome Check**: Write a function to check if a number is a palindrome.
- **Array Search**: Write a function to search for a target number in an array.
- **Generate Combinations**: Write a function that generates all combinations of a given set of numbers.
- **Calculate Average**: Write a function to calculate the average of an array of numbers.
## Contributing
We encourage others to contribute by adding new exercises, improving existing ones, or suggesting optimizations. To contribute, please follow these steps:
1. Fork this repository.
2. Clone your fork to your local machine.
3. Create a new branch (`git checkout -b feature-name`).
4. Make your changes and commit them (`git commit -am 'Add new exercise'`).
5. Push to your forked repository (`git push origin feature-name`).
6. Open a pull request to merge your changes into the main repository.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.