|
|
@@ -1,22 +1,24 @@ |
|
|
|
let Name = "Determination"; |
|
|
|
'use strict' |
|
|
|
let ShuttleName = "Determination"; |
|
|
|
let ShuttleSpeed = 17500; |
|
|
|
let DistanceMars = 225000000; |
|
|
|
let DistanceMoon = 384400; |
|
|
|
let MilesPerKM = 0.621; |
|
|
|
const DISTANCE_MARS = 225000000; |
|
|
|
const DISTANCE_MOON = 384400; |
|
|
|
const MILES_PER_KM = 0.621; |
|
|
|
const HOURS_PER_DAY = 24; |
|
|
|
|
|
|
|
typeof Name; |
|
|
|
typeof ShuttleSpeed; |
|
|
|
typeof DistanceMars; |
|
|
|
typeof DistanceMoon; |
|
|
|
typeof MilesPerKM; |
|
|
|
console.log(typeof ShuttleName); |
|
|
|
console.log(typeof ShuttleSpeed); |
|
|
|
console.log(typeof DISTANCE_MARS); |
|
|
|
console.log(typeof DISTANCE_MOON); |
|
|
|
console.log(typeof MILES_PER_KM); |
|
|
|
|
|
|
|
let MilesToMars = DistanceMars * MilesPerKM; |
|
|
|
let MilesToMars = DISTANCE_MARS * MILES_PER_KM; |
|
|
|
let HoursToMars = MilesToMars / ShuttleSpeed; |
|
|
|
let DaysToMars = HoursToMars / 24; |
|
|
|
let DaysToMars = HoursToMars / HOURS_PER_DAY; |
|
|
|
|
|
|
|
let MilesToMoon = DistanceMoon * MilesPerKM; |
|
|
|
let MilesToMoon = DISTANCE_MOON * MILES_PER_KM; |
|
|
|
let HoursToMoon = MilesToMoon / ShuttleSpeed; |
|
|
|
let DaysToMoon = HoursToMoon / 24; |
|
|
|
let DaysToMoon = HoursToMoon / HOURS_PER_DAY; |
|
|
|
|
|
|
|
console.log(Name + " will take " + DaysToMars + "days to reach Mars."); |
|
|
|
console.log(Name + " will take " + DaysToMoon + "days to reach the Moon."); |
|
|
|
console.log(ShuttleName + " will take " + DaysToMars + "days to reach Mars."); |
|
|
|
console.log(ShuttleName + " will take " + DaysToMoon + "days to reach the Moon."); |