This program will calculate a user's hypothetical age as well as their current life expectancy on different planets. The user enters their year of birth, it is parsed through a date object and returns as an age to be used in the calculations. If the user's age exceeds their inputted life expectancy, this program will calculate how many years that user has lived over the average. Each small step 🚀 of this program has been carefully tested using Jasmine and Karma. Logic is running clean and additional features are being added.
- The program will return a user's age.
- Input: (20)
- Output: (20)
- The program will pass a user's birth year into a Date object and calculate their current age.
- Input: (1993)
- Output: (25)
- The program will return a user's age in Mercury years. (.24 Earth years.)
- Input: (1)
- Output: (.24)
- The program will return a user's age in Venus years. (.62 Earth years.)
- Input: (1)
- Output: (.62)
- The program will return a user's age in Mars years. (1.88 Earth years.)
- Input: (1)
- Output: (1.88)
- The program will return a user's age in Jupiter years. (11.86 Earth years.)
- Input: (1)
- Output: (11.86)
- The program will calculate how many years a user is expected to live on each planet respectively, using a life expectancy value that they supply.
- Input: (79)
- Output: (79 - (calculated solar age))
- The program will calculate how many years the user has exceeded the inputted life expectancy, if applicable.
- Input: (90)
- Output: (90 - life expectancy)
- JavaScript
- HTML
- jQuery
- ESlint
- Babel
- Jasmine
- Karma
- Node Package Manager
- Webpack
First, make sure you have node package manager installed. Check out https://www.npmjs.com/get-npm for information on that. Also make sure you have karma installed globally:
$ npm install -g karma-cli
$ git clone https://github.com/Eucile/galactic-calculator-test
$ cd galactic-calculator-test
$ npm install
$ npm init -y
$ npm run start
$ npm test
Copyright (c) 2018 { Krystal Foster}