trackler 2.2.1.94 → 2.2.1.95
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/anagram/canonical-data.json +1 -37
- data/tracks/crystal/exercises/hello-world/{HINTS.md → .meta/hints.md} +0 -0
- data/tracks/java/exercises/prime-factors/.meta/hints.md +58 -0
- data/tracks/java/exercises/prime-factors/README.md +62 -0
- data/tracks/java/exercises/robot-name/.meta/hints.md +58 -0
- data/tracks/java/exercises/robot-name/README.md +62 -0
- data/tracks/java/exercises/robot-simulator/src/test/java/RobotTest.java +9 -5
- data/tracks/java/exercises/run-length-encoding/.meta/hints.md +58 -0
- data/tracks/java/exercises/run-length-encoding/README.md +62 -0
- data/tracks/javascript/config/exercise_readme.go.tmpl +26 -4
- data/tracks/javascript/exercises/accumulate/README.md +16 -16
- data/tracks/javascript/exercises/acronym/README.md +15 -13
- data/tracks/javascript/exercises/all-your-base/README.md +16 -14
- data/tracks/javascript/exercises/allergies/README.md +15 -13
- data/tracks/javascript/exercises/alphametics/README.md +17 -15
- data/tracks/javascript/exercises/anagram/README.md +15 -12
- data/tracks/javascript/exercises/atbash-cipher/README.md +17 -13
- data/tracks/javascript/exercises/beer-song/README.md +17 -14
- data/tracks/javascript/exercises/binary/README.md +17 -12
- data/tracks/javascript/exercises/binary-search/README.md +15 -12
- data/tracks/javascript/exercises/binary-search-tree/README.md +15 -12
- data/tracks/javascript/exercises/bob/README.md +17 -12
- data/tracks/javascript/exercises/bowling/README.md +38 -21
- data/tracks/javascript/exercises/bracket-push/README.md +15 -12
- data/tracks/javascript/exercises/change/README.md +31 -17
- data/tracks/javascript/exercises/circular-buffer/README.md +28 -18
- data/tracks/javascript/exercises/clock/README.md +15 -12
- data/tracks/javascript/exercises/collatz-conjecture/README.md +15 -12
- data/tracks/javascript/exercises/connect/README.md +17 -16
- data/tracks/javascript/exercises/crypto-square/README.md +25 -20
- data/tracks/javascript/exercises/custom-set/README.md +15 -13
- data/tracks/javascript/exercises/diamond/README.md +21 -18
- data/tracks/javascript/exercises/difference-of-squares/README.md +16 -13
- data/tracks/javascript/exercises/diffie-hellman/README.md +15 -17
- data/tracks/javascript/exercises/etl/README.md +18 -13
- data/tracks/javascript/exercises/flatten-array/README.md +16 -14
- data/tracks/javascript/exercises/food-chain/README.md +16 -13
- data/tracks/javascript/exercises/forth/README.md +17 -18
- data/tracks/javascript/exercises/gigasecond/README.md +15 -12
- data/tracks/javascript/exercises/grade-school/README.md +15 -13
- data/tracks/javascript/exercises/grains/README.md +15 -13
- data/tracks/javascript/exercises/hamming/README.md +15 -12
- data/tracks/javascript/exercises/hello-world/README.md +15 -12
- data/tracks/javascript/exercises/hexadecimal/README.md +15 -12
- data/tracks/javascript/exercises/isbn-verifier/README.md +44 -36
- data/tracks/javascript/exercises/isogram/README.md +17 -13
- data/tracks/javascript/exercises/kindergarten-garden/README.md +28 -25
- data/tracks/javascript/exercises/largest-series-product/README.md +15 -12
- data/tracks/javascript/exercises/leap/README.md +16 -13
- data/tracks/javascript/exercises/linked-list/README.md +25 -22
- data/tracks/javascript/exercises/list-ops/README.md +15 -13
- data/tracks/javascript/exercises/luhn/README.md +22 -19
- data/tracks/javascript/exercises/matrix/README.md +21 -16
- data/tracks/javascript/exercises/meetup/README.md +31 -25
- data/tracks/javascript/exercises/minesweeper/README.md +15 -13
- data/tracks/javascript/exercises/nth-prime/README.md +15 -12
- data/tracks/javascript/exercises/nucleotide-count/README.md +23 -34
- data/tracks/javascript/exercises/ocr-numbers/README.md +21 -18
- data/tracks/javascript/exercises/octal/README.md +21 -14
- data/tracks/javascript/exercises/palindrome-products/README.md +29 -27
- data/tracks/javascript/exercises/pangram/README.md +16 -13
- data/tracks/javascript/exercises/pascals-triangle/README.md +17 -14
- data/tracks/javascript/exercises/perfect-numbers/README.md +17 -14
- data/tracks/javascript/exercises/phone-number/README.md +19 -15
- data/tracks/javascript/exercises/pig-latin/README.md +15 -12
- data/tracks/javascript/exercises/point-mutations/README.md +15 -12
- data/tracks/javascript/exercises/prime-factors/README.md +15 -12
- data/tracks/javascript/exercises/protein-translation/README.md +19 -17
- data/tracks/javascript/exercises/proverb/README.md +29 -21
- data/tracks/javascript/exercises/pythagorean-triplet/README.md +18 -15
- data/tracks/javascript/exercises/queen-attack/README.md +16 -13
- data/tracks/javascript/exercises/raindrops/README.md +15 -12
- data/tracks/javascript/exercises/reverse-string/README.md +19 -15
- data/tracks/javascript/exercises/rna-transcription/README.md +16 -13
- data/tracks/javascript/exercises/robot-name/README.md +15 -12
- data/tracks/javascript/exercises/robot-simulator/README.md +15 -12
- data/tracks/javascript/exercises/roman-numerals/README.md +16 -13
- data/tracks/javascript/exercises/run-length-encoding/README.md +19 -16
- data/tracks/javascript/exercises/saddle-points/README.md +16 -13
- data/tracks/javascript/exercises/say/README.md +15 -12
- data/tracks/javascript/exercises/scrabble-score/README.md +18 -13
- data/tracks/javascript/exercises/secret-handshake/README.md +16 -13
- data/tracks/javascript/exercises/series/README.md +15 -12
- data/tracks/javascript/exercises/sieve/README.md +15 -12
- data/tracks/javascript/exercises/simple-cipher/README.md +19 -18
- data/tracks/javascript/exercises/simple-linked-list/README.md +15 -12
- data/tracks/javascript/exercises/space-age/README.md +16 -13
- data/tracks/javascript/exercises/strain/README.md +15 -12
- data/tracks/javascript/exercises/sublist/README.md +14 -17
- data/tracks/javascript/exercises/sum-of-multiples/README.md +19 -19
- data/tracks/javascript/exercises/transpose/README.md +15 -12
- data/tracks/javascript/exercises/triangle/README.md +24 -18
- data/tracks/javascript/exercises/trinary/README.md +16 -13
- data/tracks/javascript/exercises/twelve-days/README.md +17 -16
- data/tracks/javascript/exercises/two-bucket/README.md +25 -22
- data/tracks/javascript/exercises/two-fer/README.md +19 -14
- data/tracks/javascript/exercises/word-count/README.md +16 -14
- data/tracks/javascript/exercises/wordy/README.md +15 -17
- data/tracks/javascript/exercises/zipper/README.md +20 -18
- data/tracks/perl6/docs/ABOUT.md +12 -21
- metadata +6 -4
- data/tracks/javascript/docs/EXERCISE_README_INSERT.md +0 -22
@@ -3,19 +3,19 @@
|
|
3
3
|
Given a diagram, determine which plants each child in the kindergarten class is
|
4
4
|
responsible for.
|
5
5
|
|
6
|
-
The kindergarten class is learning about growing plants. The
|
6
|
+
The kindergarten class is learning about growing plants. The teacher
|
7
7
|
thought it would be a good idea to give them actual seeds, plant them in
|
8
8
|
actual dirt, and grow actual plants.
|
9
9
|
|
10
10
|
They've chosen to grow grass, clover, radishes, and violets.
|
11
11
|
|
12
|
-
To this end,
|
13
|
-
|
14
|
-
|
12
|
+
To this end, the children have put little cups along the window sills, and
|
13
|
+
planted one type of plant in each cup, choosing randomly from the available
|
14
|
+
types of seeds.
|
15
15
|
|
16
|
-
```
|
16
|
+
```text
|
17
17
|
[window][window][window]
|
18
|
-
........................ # each dot represents a
|
18
|
+
........................ # each dot represents a cup
|
19
19
|
........................
|
20
20
|
```
|
21
21
|
|
@@ -25,27 +25,27 @@ There are 12 children in the class:
|
|
25
25
|
- Eve, Fred, Ginny, Harriet,
|
26
26
|
- Ileana, Joseph, Kincaid, and Larry.
|
27
27
|
|
28
|
-
Each child gets 4 cups, two on each row.
|
29
|
-
|
28
|
+
Each child gets 4 cups, two on each row. Their teacher assigns cups to
|
29
|
+
the children alphabetically by their names.
|
30
30
|
|
31
31
|
The following diagram represents Alice's plants:
|
32
32
|
|
33
|
-
```
|
33
|
+
```text
|
34
34
|
[window][window][window]
|
35
35
|
VR......................
|
36
36
|
RG......................
|
37
37
|
```
|
38
38
|
|
39
|
-
|
40
|
-
row
|
39
|
+
In the first row, nearest the windows, she has a violet and a radish. In the
|
40
|
+
second row she has a radish and some grass.
|
41
41
|
|
42
42
|
Your program will be given the plants from left-to-right starting with
|
43
43
|
the row nearest the windows. From this, it should be able to determine
|
44
|
-
which plants belong to
|
44
|
+
which plants belong to each student.
|
45
45
|
|
46
46
|
For example, if it's told that the garden looks like so:
|
47
47
|
|
48
|
-
```
|
48
|
+
```text
|
49
49
|
[window][window][window]
|
50
50
|
VRCGVVRVCGGCCGVRGCVCGCGV
|
51
51
|
VRCCCGCRRGVCGCRVVCVGCGCV
|
@@ -61,26 +61,29 @@ While asking for Bob's plants would yield:
|
|
61
61
|
|
62
62
|
## Setup
|
63
63
|
|
64
|
-
Go through the setup instructions for JavaScript to
|
65
|
-
|
64
|
+
Go through the setup instructions for JavaScript to install the
|
65
|
+
necessary dependencies:
|
66
66
|
|
67
67
|
http://exercism.io/languages/javascript/installation
|
68
68
|
|
69
|
-
##
|
69
|
+
## Running the test suite
|
70
70
|
|
71
|
-
|
71
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
72
|
+
You can install it by opening a terminal window and running the
|
73
|
+
following command:
|
72
74
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
test the Hello World exercise:
|
75
|
+
```sh
|
76
|
+
npm install -g jasmine
|
77
|
+
```
|
77
78
|
|
78
|
-
|
79
|
+
Run the test suite from the exercise directory with:
|
79
80
|
|
80
|
-
|
81
|
+
```sh
|
82
|
+
jasmine kindergarten-garden.spec.js
|
83
|
+
```
|
81
84
|
|
82
|
-
|
83
|
-
changing `xit` to `it`.
|
85
|
+
In many test suites all but the first test have been marked "pending".
|
86
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
84
87
|
|
85
88
|
## Source
|
86
89
|
|
@@ -15,26 +15,29 @@ the largest product for a series of 6 digits is 23520.
|
|
15
15
|
|
16
16
|
## Setup
|
17
17
|
|
18
|
-
Go through the setup instructions for JavaScript to
|
19
|
-
|
18
|
+
Go through the setup instructions for JavaScript to install the
|
19
|
+
necessary dependencies:
|
20
20
|
|
21
21
|
http://exercism.io/languages/javascript/installation
|
22
22
|
|
23
|
-
##
|
23
|
+
## Running the test suite
|
24
24
|
|
25
|
-
|
25
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
26
|
+
You can install it by opening a terminal window and running the
|
27
|
+
following command:
|
26
28
|
|
27
|
-
|
29
|
+
```sh
|
30
|
+
npm install -g jasmine
|
31
|
+
```
|
28
32
|
|
29
|
-
|
30
|
-
test the Hello World exercise:
|
33
|
+
Run the test suite from the exercise directory with:
|
31
34
|
|
32
|
-
|
35
|
+
```sh
|
36
|
+
jasmine largest-series-product.spec.js
|
37
|
+
```
|
33
38
|
|
34
|
-
In many test suites all but the first test have been
|
35
|
-
|
36
|
-
Once you get a test passing, you can unskip the next one by
|
37
|
-
changing `xit` to `it`.
|
39
|
+
In many test suites all but the first test have been marked "pending".
|
40
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
38
41
|
|
39
42
|
## Source
|
40
43
|
|
@@ -4,7 +4,7 @@ Given a year, report if it is a leap year.
|
|
4
4
|
|
5
5
|
The tricky thing here is that a leap year in the Gregorian calendar occurs:
|
6
6
|
|
7
|
-
```
|
7
|
+
```text
|
8
8
|
on every year that is evenly divisible by 4
|
9
9
|
except every year that is evenly divisible by 100
|
10
10
|
unless the year is also evenly divisible by 400
|
@@ -28,26 +28,29 @@ phenomenon, go watch [this youtube video][video].
|
|
28
28
|
|
29
29
|
## Setup
|
30
30
|
|
31
|
-
Go through the setup instructions for JavaScript to
|
32
|
-
|
31
|
+
Go through the setup instructions for JavaScript to install the
|
32
|
+
necessary dependencies:
|
33
33
|
|
34
34
|
http://exercism.io/languages/javascript/installation
|
35
35
|
|
36
|
-
##
|
36
|
+
## Running the test suite
|
37
37
|
|
38
|
-
|
38
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
39
|
+
You can install it by opening a terminal window and running the
|
40
|
+
following command:
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
test the Hello World exercise:
|
42
|
+
```sh
|
43
|
+
npm install -g jasmine
|
44
|
+
```
|
44
45
|
|
45
|
-
|
46
|
+
Run the test suite from the exercise directory with:
|
46
47
|
|
47
|
-
|
48
|
+
```sh
|
49
|
+
jasmine leap.spec.js
|
50
|
+
```
|
48
51
|
|
49
|
-
|
50
|
-
changing `xit` to `it`.
|
52
|
+
In many test suites all but the first test have been marked "pending".
|
53
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
51
54
|
|
52
55
|
## Source
|
53
56
|
|
@@ -2,18 +2,18 @@
|
|
2
2
|
|
3
3
|
Implement a doubly linked list.
|
4
4
|
|
5
|
-
Like an array, a linked list is a simple linear data structure. Several
|
6
|
-
common data types can be implemented using linked lists, like queues,
|
5
|
+
Like an array, a linked list is a simple linear data structure. Several
|
6
|
+
common data types can be implemented using linked lists, like queues,
|
7
7
|
stacks, and associative arrays.
|
8
8
|
|
9
|
-
A linked list is a collection of data elements called *nodes*. In a
|
10
|
-
*singly linked list* each node holds a value and a link to the next node.
|
11
|
-
In a *doubly linked list* each node also holds a link to the previous
|
9
|
+
A linked list is a collection of data elements called *nodes*. In a
|
10
|
+
*singly linked list* each node holds a value and a link to the next node.
|
11
|
+
In a *doubly linked list* each node also holds a link to the previous
|
12
12
|
node.
|
13
13
|
|
14
|
-
You will write an implementation of a doubly linked list. Implement a
|
15
|
-
Node to hold a value and pointers to the next and previous nodes. Then
|
16
|
-
implement a List which holds references to the first and last node and
|
14
|
+
You will write an implementation of a doubly linked list. Implement a
|
15
|
+
Node to hold a value and pointers to the next and previous nodes. Then
|
16
|
+
implement a List which holds references to the first and last node and
|
17
17
|
offers an array-like interface for adding and removing items:
|
18
18
|
|
19
19
|
* `push` (*insert value at back*);
|
@@ -21,34 +21,37 @@ offers an array-like interface for adding and removing items:
|
|
21
21
|
* `shift` (*remove value at front*).
|
22
22
|
* `unshift` (*insert value at front*);
|
23
23
|
|
24
|
-
To keep your implementation simple, the tests will not cover error
|
25
|
-
conditions. Specifically: `pop` or `shift` will never be called on an
|
24
|
+
To keep your implementation simple, the tests will not cover error
|
25
|
+
conditions. Specifically: `pop` or `shift` will never be called on an
|
26
26
|
empty list.
|
27
27
|
|
28
28
|
If you want to know more about linked lists, check [Wikipedia](https://en.wikipedia.org/wiki/Linked_list).
|
29
29
|
|
30
30
|
## Setup
|
31
31
|
|
32
|
-
Go through the setup instructions for JavaScript to
|
33
|
-
|
32
|
+
Go through the setup instructions for JavaScript to install the
|
33
|
+
necessary dependencies:
|
34
34
|
|
35
35
|
http://exercism.io/languages/javascript/installation
|
36
36
|
|
37
|
-
##
|
37
|
+
## Running the test suite
|
38
38
|
|
39
|
-
|
39
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
40
|
+
You can install it by opening a terminal window and running the
|
41
|
+
following command:
|
40
42
|
|
41
|
-
|
43
|
+
```sh
|
44
|
+
npm install -g jasmine
|
45
|
+
```
|
42
46
|
|
43
|
-
|
44
|
-
test the Hello World exercise:
|
47
|
+
Run the test suite from the exercise directory with:
|
45
48
|
|
46
|
-
|
49
|
+
```sh
|
50
|
+
jasmine linked-list.spec.js
|
51
|
+
```
|
47
52
|
|
48
|
-
In many test suites all but the first test have been
|
49
|
-
|
50
|
-
Once you get a test passing, you can unskip the next one by
|
51
|
-
changing `xit` to `it`.
|
53
|
+
In many test suites all but the first test have been marked "pending".
|
54
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
52
55
|
|
53
56
|
## Source
|
54
57
|
|
@@ -8,27 +8,29 @@ without using existing functions.
|
|
8
8
|
|
9
9
|
## Setup
|
10
10
|
|
11
|
-
Go through the setup instructions for JavaScript to
|
12
|
-
|
11
|
+
Go through the setup instructions for JavaScript to install the
|
12
|
+
necessary dependencies:
|
13
13
|
|
14
14
|
http://exercism.io/languages/javascript/installation
|
15
15
|
|
16
|
-
##
|
16
|
+
## Running the test suite
|
17
17
|
|
18
|
-
|
18
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
19
|
+
You can install it by opening a terminal window and running the
|
20
|
+
following command:
|
19
21
|
|
20
|
-
|
22
|
+
```sh
|
23
|
+
npm install -g jasmine
|
24
|
+
```
|
21
25
|
|
22
|
-
|
23
|
-
test the Hello World exercise:
|
26
|
+
Run the test suite from the exercise directory with:
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
Once you get a test passing, you can unskip the next one by
|
30
|
-
changing `xit` to `it`.
|
28
|
+
```sh
|
29
|
+
jasmine list-ops.spec.js
|
30
|
+
```
|
31
31
|
|
32
|
+
In many test suites all but the first test have been marked "pending".
|
33
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
32
34
|
|
33
35
|
## Submitting Incomplete Solutions
|
34
36
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -18,27 +18,27 @@ are disallowed.
|
|
18
18
|
|
19
19
|
## Example 1: valid credit card number
|
20
20
|
|
21
|
-
```
|
21
|
+
```text
|
22
22
|
4539 1488 0343 6467
|
23
23
|
```
|
24
24
|
|
25
25
|
The first step of the Luhn algorithm is to double every second digit,
|
26
26
|
starting from the right. We will be doubling
|
27
27
|
|
28
|
-
```
|
28
|
+
```text
|
29
29
|
4_3_ 1_8_ 0_4_ 6_6_
|
30
30
|
```
|
31
31
|
|
32
32
|
If doubling the number results in a number greater than 9 then subtract 9
|
33
33
|
from the product. The results of our doubling:
|
34
34
|
|
35
|
-
```
|
35
|
+
```text
|
36
36
|
8569 2478 0383 3437
|
37
37
|
```
|
38
38
|
|
39
39
|
Then sum all of the digits:
|
40
40
|
|
41
|
-
```
|
41
|
+
```text
|
42
42
|
8+5+6+9+2+4+7+8+0+3+8+3+3+4+3+7 = 80
|
43
43
|
```
|
44
44
|
|
@@ -46,19 +46,19 @@ If the sum is evenly divisible by 10, then the number is valid. This number is v
|
|
46
46
|
|
47
47
|
## Example 2: invalid credit card number
|
48
48
|
|
49
|
-
```
|
49
|
+
```text
|
50
50
|
8273 1232 7352 0569
|
51
51
|
```
|
52
52
|
|
53
53
|
Double the second digits, starting from the right
|
54
54
|
|
55
|
-
```
|
55
|
+
```text
|
56
56
|
7253 2262 5312 0539
|
57
57
|
```
|
58
58
|
|
59
59
|
Sum the digits
|
60
60
|
|
61
|
-
```
|
61
|
+
```text
|
62
62
|
7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57
|
63
63
|
```
|
64
64
|
|
@@ -66,26 +66,29 @@ Sum the digits
|
|
66
66
|
|
67
67
|
## Setup
|
68
68
|
|
69
|
-
Go through the setup instructions for JavaScript to
|
70
|
-
|
69
|
+
Go through the setup instructions for JavaScript to install the
|
70
|
+
necessary dependencies:
|
71
71
|
|
72
72
|
http://exercism.io/languages/javascript/installation
|
73
73
|
|
74
|
-
##
|
75
|
-
|
76
|
-
Execute the tests with:
|
74
|
+
## Running the test suite
|
77
75
|
|
78
|
-
|
76
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
77
|
+
You can install it by opening a terminal window and running the
|
78
|
+
following command:
|
79
79
|
|
80
|
-
|
81
|
-
|
80
|
+
```sh
|
81
|
+
npm install -g jasmine
|
82
|
+
```
|
82
83
|
|
83
|
-
|
84
|
+
Run the test suite from the exercise directory with:
|
84
85
|
|
85
|
-
|
86
|
+
```sh
|
87
|
+
jasmine luhn.spec.js
|
88
|
+
```
|
86
89
|
|
87
|
-
|
88
|
-
changing `xit` to `it`.
|
90
|
+
In many test suites all but the first test have been marked "pending".
|
91
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
89
92
|
|
90
93
|
## Source
|
91
94
|
|
@@ -5,13 +5,15 @@ that matrix.
|
|
5
5
|
|
6
6
|
So given a string with embedded newlines like:
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
```text
|
9
|
+
9 8 7
|
10
|
+
5 3 2
|
11
|
+
6 6 7
|
12
|
+
```
|
11
13
|
|
12
14
|
representing this matrix:
|
13
15
|
|
14
|
-
```
|
16
|
+
```text
|
15
17
|
0 1 2
|
16
18
|
|---------
|
17
19
|
0 | 9 8 7
|
@@ -40,26 +42,29 @@ And its columns:
|
|
40
42
|
|
41
43
|
## Setup
|
42
44
|
|
43
|
-
Go through the setup instructions for JavaScript to
|
44
|
-
|
45
|
+
Go through the setup instructions for JavaScript to install the
|
46
|
+
necessary dependencies:
|
45
47
|
|
46
48
|
http://exercism.io/languages/javascript/installation
|
47
49
|
|
48
|
-
##
|
49
|
-
|
50
|
-
Execute the tests with:
|
50
|
+
## Running the test suite
|
51
51
|
|
52
|
-
|
52
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
53
|
+
You can install it by opening a terminal window and running the
|
54
|
+
following command:
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
+
```sh
|
57
|
+
npm install -g jasmine
|
58
|
+
```
|
56
59
|
|
57
|
-
|
60
|
+
Run the test suite from the exercise directory with:
|
58
61
|
|
59
|
-
|
62
|
+
```sh
|
63
|
+
jasmine matrix.spec.js
|
64
|
+
```
|
60
65
|
|
61
|
-
|
62
|
-
changing `xit` to `it`.
|
66
|
+
In many test suites all but the first test have been marked "pending".
|
67
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
63
68
|
|
64
69
|
## Source
|
65
70
|
|
@@ -2,49 +2,55 @@
|
|
2
2
|
|
3
3
|
Calculate the date of meetups.
|
4
4
|
|
5
|
-
Typically meetups happen on the same day of the week. In this exercise, you
|
6
|
-
a description of a meetup date, and return the actual meetup date.
|
5
|
+
Typically meetups happen on the same day of the week. In this exercise, you
|
6
|
+
will take a description of a meetup date, and return the actual meetup date.
|
7
7
|
|
8
8
|
Examples of general descriptions are:
|
9
9
|
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
10
|
+
- The first Monday of January 2017
|
11
|
+
- The third Tuesday of January 2017
|
12
|
+
- The wednesteenth of January 2017
|
13
|
+
- The last Thursday of January 2017
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
The descriptors you are expected to parse are:
|
16
|
+
first, second, third, fourth, fifth, last, monteenth, tuesteenth, wednesteenth,
|
17
|
+
thursteenth, friteenth, saturteenth, sunteenth
|
18
|
+
|
19
|
+
Note that "monteenth", "tuesteenth", etc are all made up words. There was a
|
20
|
+
meetup whose members realized that there are exactly 7 numbered days in a month
|
21
|
+
that end in '-teenth'. Therefore, one is guaranteed that each day of the week
|
18
22
|
(Monday, Tuesday, ...) will have exactly one date that is named with '-teenth'
|
19
23
|
in every month.
|
20
24
|
|
21
|
-
Given examples of a meetup dates, each containing a month, day, year, and
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
+
Given examples of a meetup dates, each containing a month, day, year, and
|
26
|
+
descriptor calculate the date of the actual meetup. For example, if given
|
27
|
+
"The first Monday of January 2017", the correct meetup date is 2017/1/2.
|
25
28
|
|
26
29
|
## Setup
|
27
30
|
|
28
|
-
Go through the setup instructions for JavaScript to
|
29
|
-
|
31
|
+
Go through the setup instructions for JavaScript to install the
|
32
|
+
necessary dependencies:
|
30
33
|
|
31
34
|
http://exercism.io/languages/javascript/installation
|
32
35
|
|
33
|
-
##
|
34
|
-
|
35
|
-
Execute the tests with:
|
36
|
+
## Running the test suite
|
36
37
|
|
37
|
-
|
38
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
39
|
+
You can install it by opening a terminal window and running the
|
40
|
+
following command:
|
38
41
|
|
39
|
-
|
40
|
-
|
42
|
+
```sh
|
43
|
+
npm install -g jasmine
|
44
|
+
```
|
41
45
|
|
42
|
-
|
46
|
+
Run the test suite from the exercise directory with:
|
43
47
|
|
44
|
-
|
48
|
+
```sh
|
49
|
+
jasmine meetup.spec.js
|
50
|
+
```
|
45
51
|
|
46
|
-
|
47
|
-
changing `xit` to `it`.
|
52
|
+
In many test suites all but the first test have been marked "pending".
|
53
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
48
54
|
|
49
55
|
## Source
|
50
56
|
|
@@ -28,27 +28,29 @@ into this:
|
|
28
28
|
|
29
29
|
## Setup
|
30
30
|
|
31
|
-
Go through the setup instructions for JavaScript to
|
32
|
-
|
31
|
+
Go through the setup instructions for JavaScript to install the
|
32
|
+
necessary dependencies:
|
33
33
|
|
34
34
|
http://exercism.io/languages/javascript/installation
|
35
35
|
|
36
|
-
##
|
36
|
+
## Running the test suite
|
37
37
|
|
38
|
-
|
38
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
39
|
+
You can install it by opening a terminal window and running the
|
40
|
+
following command:
|
39
41
|
|
40
|
-
|
42
|
+
```sh
|
43
|
+
npm install -g jasmine
|
44
|
+
```
|
41
45
|
|
42
|
-
|
43
|
-
test the Hello World exercise:
|
46
|
+
Run the test suite from the exercise directory with:
|
44
47
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
Once you get a test passing, you can unskip the next one by
|
50
|
-
changing `xit` to `it`.
|
48
|
+
```sh
|
49
|
+
jasmine minesweeper.spec.js
|
50
|
+
```
|
51
51
|
|
52
|
+
In many test suites all but the first test have been marked "pending".
|
53
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
52
54
|
|
53
55
|
## Submitting Incomplete Solutions
|
54
56
|
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -10,26 +10,29 @@ numbers, pretend they don't exist and implement them yourself.
|
|
10
10
|
|
11
11
|
## Setup
|
12
12
|
|
13
|
-
Go through the setup instructions for JavaScript to
|
14
|
-
|
13
|
+
Go through the setup instructions for JavaScript to install the
|
14
|
+
necessary dependencies:
|
15
15
|
|
16
16
|
http://exercism.io/languages/javascript/installation
|
17
17
|
|
18
|
-
##
|
18
|
+
## Running the test suite
|
19
19
|
|
20
|
-
|
20
|
+
The provided test suite uses [Jasmine](https://jasmine.github.io/).
|
21
|
+
You can install it by opening a terminal window and running the
|
22
|
+
following command:
|
21
23
|
|
22
|
-
|
24
|
+
```sh
|
25
|
+
npm install -g jasmine
|
26
|
+
```
|
23
27
|
|
24
|
-
|
25
|
-
test the Hello World exercise:
|
28
|
+
Run the test suite from the exercise directory with:
|
26
29
|
|
27
|
-
|
30
|
+
```sh
|
31
|
+
jasmine nth-prime.spec.js
|
32
|
+
```
|
28
33
|
|
29
|
-
In many test suites all but the first test have been
|
30
|
-
|
31
|
-
Once you get a test passing, you can unskip the next one by
|
32
|
-
changing `xit` to `it`.
|
34
|
+
In many test suites all but the first test have been marked "pending".
|
35
|
+
Once you get a test passing, activate the next one by changing `xit` to `it`.
|
33
36
|
|
34
37
|
## Source
|
35
38
|
|