Skip to content

Commit f143b8a

Browse files
committed
modified
1 parent 9e88293 commit f143b8a

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed
Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
// Declare and assign the variables below
2+
spaceShuttleName = "Determination";
3+
shuttleSpeedMPH = 17500;
4+
distanceToMarsKM = 225000000;
5+
distanceToMoonKM = 384400;
6+
milesPerKilometer = 0.621;
27

38
// Use console.log to print the 'typeof' each variable. Print one item per line.
9+
console.log(typeof spaceShuttleName);
10+
console.log(typeof shuttleSpeedMPH);
11+
console.log(typeof distanceToMarsKM);
12+
console.log(typeof distanceToMoonKM);
13+
console.log(typeof milesPerKilometer);
414

515
// Calculate a space mission below
6-
16+
milesToMars = distanceToMarsKM * milesPerKilometer;
17+
//console.log(milesToMars);
18+
hoursToMars = milesToMars/shuttleSpeedMPH;
19+
//console.log(hoursToMars);
20+
daysToMars = hoursToMars/24;
21+
//console.log(daysToMars);
722
// Print the results of the space mission calculations below
23+
console.log(`${spaceShuttleName} will take ${daysToMars} days to reach Mars.`);
824

925
// Calculate a trip to the moon below
26+
milesToMoon = distanceToMoonKM * milesPerKilometer;
27+
hoursToMoon = milesToMoon/shuttleSpeedMPH;
28+
daysToMoon = hoursToMoon/24;
29+
//console.log(milesToMoon);
30+
//console.log(hoursToMoon);
31+
//console.log(daysToMoon);
1032

11-
// Print the results of the trip to the moon below
33+
// Print the results of the trip to the moon below
34+
console.log(`${spaceShuttleName} will take ${daysToMoon} days to reach the Moon.`);

0 commit comments

Comments
 (0)