Browse Source

Tothemoon

master
Terence Verbanck 2 years ago
parent
commit
4345679f5b
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      variables.js

+ 7
- 1
variables.js View File

@@ -15,4 +15,10 @@ let milesToMars = DISTANCE_TO_MARS_KM * MILES_PER_KM;
let hoursToMars = milesToMars / shuttleSpeed;
let daysToMars = hoursToMars / HOURS_PER_DAY;

console.log(shuttleName + ' will take ' + daysToMars.toFixed(2) + ' days to reach Mars')
console.log(shuttleName + ' will take ' + daysToMars.toFixed(2) + ' days to reach Mars')

let milesToMoon = DISTANCE_TO_THE_MOON_KM * MILES_PER_KM;
let hoursToMoon = milesToMoon / shuttleSpeed;
let daysToMoon = hoursToMoon / HOURS_PER_DAY;

console.log(shuttleName + ' will take ' + daysToMoon.toFixed(2) + ' days to reach Moon')

Loading…
Cancel
Save