Skip to content

Commit e2ddce0

Browse files
author
Tymoteusz
authored
Merge pull request #13 from 403-html/refine-readme
Refine readme
2 parents 7f89e21 + a2626a3 commit e2ddce0

10 files changed

Lines changed: 79 additions & 15 deletions

File tree

README.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,61 @@
1-
# javascript-coding-challenges
2-
Here I will put my challenges with how I resolve it. Feel free to fork by yourself.
1+
# Javascript Coding Challenges
2+
3+
![Version](https://img.shields.io/github/package-json/v/403-html/javascript-coding-challenges)
4+
![Last commit](https://img.shields.io/github/last-commit/403-html/javascript-coding-challenges)
5+
![Jest version](https://img.shields.io/badge/testing%20library-jest-blue)
6+
![Language](https://img.shields.io/github/languages/top/403-html/javascript-coding-challenges)
7+
8+
## Description
9+
10+
> Sample coding challenges. You can write and test it right away.
11+
12+
A repository for testing and storing programming tasks. Due to the added tests, it is possible to control your own capabilities.
13+
14+
It's not perfect, so if you see a bug in the solution or within tests, it will be great if you share your thoughts on the subject, for example, as an issue or creating a PR.
15+
16+
## How to work with it
17+
18+
First, you have to clone the project
19+
20+
```
21+
git clone https://github.com/403-html/javascript-coding-challenges.git
22+
```
23+
24+
then install all dependencies
25+
26+
for npm
27+
28+
```
29+
npm install
30+
```
31+
32+
or yarn
33+
34+
```
35+
yarn install
36+
```
37+
38+
Then search for an interesting challenge, for example, `prime-number`.
39+
Read the `README.md` in that folder. Write your solution in a javascript file dedicated to this folder (in our case, `isPrime.js`). There is a special place dedicated to doing that.
40+
41+
If you're sure it's all good, go to the `__tests__` folder and open the test file. Remove the `.skip` method in tests and save.
42+
43+
Run tests by npm
44+
45+
```
46+
npm run prime-number
47+
```
48+
49+
or if you're using yarn
50+
51+
```
52+
yarn run prime-number
53+
```
54+
55+
**If you take another task to do, just use the name of the task folder instead of `prime-number`.**
56+
57+
**Enjoy!**
58+
59+
## Contributors
60+
61+
> Author: Tymoteusz '403-html' Stępień

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
{
22
"name": "javascript-coding-challenges",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "My JS challenges with how I resolve them",
55
"main": "index.js",
66
"scripts": {
77
"test-all": "jest --passWithNoTests --json --outputFile=result.json --testLocationInResults",
8-
"test-customs": "jest --passWithNoTests -o"
8+
"test-customs": "jest --passWithNoTests -o",
9+
"binary-tree": "jest binary-tree/__tests__/binary-tree.spec.js",
10+
"fizzbuzz": "jest fizzbuzz/__tests__/fizzbuzz.spec.js",
11+
"pigeons": "jest pigeons/__tests__/pigeons.spec.js",
12+
"prime-number": "jest prime-number/__tests__/isPrime.spec.js",
13+
"randsum": "jest randsum/__tests__/randsum.spec.js"
914
},
1015
"repository": {
1116
"type": "git",
File renamed without changes.
File renamed without changes.
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Random N-numbers sum which is equal to 0
2-
3-
Write a function that as an argument gets the integer N `(1 < N < 100)`.
4-
5-
This function is to return an `array` that contains unique `N` random numbers in the range `-100` to `100`, and besides that the sum of these numbers must always go to `0`.
6-
7-
For example, for `N = 4` array `[-1, -2, 0, 3]`
8-
9-
---
10-
11-
**Enjoy**
1+
# Random N-numbers sum which is equal to 0
2+
3+
Write a function that as an argument gets the integer N `(1 < N < 100)`.
4+
5+
This function is to return an `array` that contains unique `N` random numbers in the range `-100` to `100`, and besides that the sum of these numbers must always go to `0`.
6+
7+
For example, for `N = 4` array `[-1, -2, 0, 3]`
8+
9+
---
10+
11+
**Enjoy**
File renamed without changes.

0 commit comments

Comments
 (0)