File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
data-and-variables/exercises Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
// Declare and assign the variables below
2
-
2
+ let shuttlename = 'determination' ;
3
+ let shuttlespeedMph = 175000 ;
4
+ let distanceTomarsKm = 225000000 ;
5
+ let distanceTomoonKm = 384400 ;
6
+ const milesPerkm = 0.621 ;
3
7
// Use console.log to print the 'typeof' each variable. Print one item per line.
4
-
8
+ console . log ( typeof ( shuttlename ) ) ;
9
+ console . log ( typeof ( "shuttlespeedMph" ) ) ;
10
+ console . log ( typeof ( distanceTomarsKm ) ) ;
11
+ console . log ( typeof ( distanceTomoonKm ) ) ;
12
+ console . log ( typeof ( milesPerkm ) ) ;
5
13
// Calculate a space mission below
6
-
14
+ let milesToMars = kilometersToMars * milesPerKilometer ;
15
+ let hoursToMars = milesToMars / shuttlespeedMph ;
16
+ let daysToMars = hoursToMars / 24 ;
7
17
// Print the results of the space mission calculations below
8
18
9
19
// Calculate a trip to the moon below
You can’t perform that action at this time.
0 commit comments