|
1 | | -# Space Age |
| 1 | +# exercism.io |
2 | 2 |
|
3 | | -Given an age in seconds, calculate how old someone would be on: |
4 | | - |
5 | | - - Earth: orbital period 365.25 Earth days, or 31557600 seconds |
6 | | - - Mercury: orbital period 0.2408467 Earth years |
7 | | - - Venus: orbital period 0.61519726 Earth years |
8 | | - - Mars: orbital period 1.8808158 Earth years |
9 | | - - Jupiter: orbital period 11.862615 Earth years |
10 | | - - Saturn: orbital period 29.447498 Earth years |
11 | | - - Uranus: orbital period 84.016846 Earth years |
12 | | - - Neptune: orbital period 164.79132 Earth years |
13 | | - |
14 | | -So if you were told someone were 1,000,000,000 seconds old, you should |
15 | | -be able to say that they're 31.69 Earth-years old. |
16 | | - |
17 | | -If you're wondering why Pluto didn't make the cut, go watch [this |
18 | | -youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs). |
19 | | - |
20 | | -## Setup |
21 | | - |
22 | | -Go through the setup instructions for Javascript to |
23 | | -install the necessary dependencies: |
24 | | - |
25 | | -[https://exercism.io/tracks/javascript/installation](https://exercism.io/tracks/javascript/installation) |
26 | | - |
27 | | -## Requirements |
28 | | - |
29 | | -Install assignment dependencies: |
30 | | - |
31 | | -```bash |
32 | | -$ npm install |
33 | | -``` |
34 | | - |
35 | | -## Making the test suite pass |
36 | | - |
37 | | -Execute the tests with: |
38 | | - |
39 | | -```bash |
40 | | -$ npm test |
41 | | -``` |
42 | | - |
43 | | -In the test suites all tests but the first have been skipped. |
44 | | - |
45 | | -Once you get a test passing, you can enable the next one by |
46 | | -changing `xtest` to `test`. |
47 | | - |
48 | | - |
49 | | -## Source |
50 | | - |
51 | | -Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=01](http://pine.fm/LearnToProgram/?Chapter=01) |
52 | | - |
53 | | -## Submitting Incomplete Solutions |
54 | | -It's possible to submit an incomplete solution so you can see how others have completed the exercise. |
| 3 | +My solutions for exercism.io - JavaScript track. |
0 commit comments