You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The clock shows h hours (0 <= h <= 23), m minutes (0 <= m <= 59) and s seconds (0 <= s <= 59) after midnight. Your task is to write a function which returns the time since midnight in milliseconds.
75
+
The clock shows h hours (0 <= h <= 23), m minutes (0 <= m <= 59) and s seconds (0 <= s <= 59) after midnight. Your task is to write a function which returns the time since midnight in milliseconds. There are 1,000 milliseconds in a second.
75
76
76
77
```js
77
78
constpast= (h, m, s) => {
@@ -116,6 +117,7 @@ console.log(greet('Sara')); // "Hello, Sara how are you doing today?"
116
117
117
118
```js
118
119
constgreet=name=> {
120
+
// Let's use a template literal
119
121
return`Hello, ${name} how are you doing today?`;
120
122
};
121
123
```
@@ -158,7 +160,7 @@ const century = year => {
158
160
159
161
## 6. Keep Hydrated!
160
162
161
-
Nathan loves cycling. Because Nathan knows it is important to stay hydrated, he drinks 0.5 litres of water per hour of cycling. You get given the time in hours and you need to return the number of litres Nathan will drink, rounded to the smallest value.
163
+
Nathan loves cycling. Because Nathan knows it is important to stay hydrated, he drinks 0.5 litres of water per hour of cycling. Given the time in hours, you need to return the number of litres of water that Nathan will drink, rounded to the smallest value.
0 commit comments