Welcome to the JavaScript exercise repository! This repository contains several JavaScript files with exercises for you to practice and improve your programming skills. Each exercise is accompanied by a description and the necessary code to complete it. In this README, you will find instructions on how to run the tests and a legend for different symbols.
To get started with the exercises, follow these steps:
- Clone the repository to your local machine.
- Ensure that you have Node.js installed on your machine.
- Install the project dependencies by running the following command in the project directory:
npm install
The tests for the exercises are written using the Jest testing framework. To run the tests and check your solutions, follow these steps:
-
Open a terminal or command prompt.
-
Navigate to the project directory.
-
Run the following command to execute the tests:
npm run test-exercises-{number}
This command will run all the tests defined in the
exercises-{number}.test.js
file and display the results in the terminal.Eg: For exercises-1.js, you need to run
npm run test-exercises-1
- Each exercise file contains comments denoted by symbols like ๐ and ๐. These symbols provide additional information and hints for solving the exercises. Make sure to read and understand them before starting each exercise.
- The
package.json
file contains the project's metadata and specifies the dependencies required to run the tests. You don't need to modify this file. - The
exercises-{number}.test.js
file contains the test cases for theexercises-{number}.js
. Runningnpm run test-exercises-{number}
executes these tests and checks the correctness of your solutions.
Feel free to explore and solve the exercises at your own pace. Happy coding!
- ๐ ( function name ) = Search the web for the built-in function for this task
- ๐ ( 1 / 2 ) = Two completely different ways to solve the exercise (either is good)