Skip to content

Commit 8577ce0

Browse files
committed
sprint_2
1 parent efe68c9 commit 8577ce0

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

Sprint-2/4-mandatory-interpret/time-format.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ function formatTimeDisplay(seconds) {
1515
// to help you answer these questions
1616

1717
// Questions
18-
19-
// a) When formatTimeDisplay is called how many times will pad be called?// =============> 3
18+
// a) When formatTimeDisplay is called how many times will pad be called
19+
// // =============> 3
2020

2121
// Call formatTimeDisplay with an input of 61, now answer the following:
2222

2323
// b) What is the value assigned to num when pad is called for the first time?
24-
// =============> write your answer here
24+
// =============> 0
2525

2626
// c) What is the return value of pad is called for the first time?
27-
// =============> write your answer here
27+
// =============> "00"
2828

2929
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
30-
// =============> write your answer here
30+
// =============> num=1
3131

3232
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
33-
// =============> write your answer here
33+
// =============> "01"

Sprint-2/5-stretch-extend/format-time.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@ function formatAs12HourClock(time) {
1010
return `${time} am`;
1111
}
1212

13+
1314
const currentOutput = formatAs12HourClock("08:00");
1415
const targetOutput = "08:00 am";
1516
console.assert(
1617
currentOutput === targetOutput,
17-
`current output: ${currentOutput}, target output: ${targetOutput}`
18+
`Expected ${targetOutput} but got ${currentOutput}`
1819
);
1920

20-
const currentOutput2 = formatAs12HourClock("23:00");
21-
const targetOutput2 = "11:00 pm";
22-
console.assert(
23-
currentOutput2 === targetOutput2,
24-
`current output: ${currentOutput2}, target output: ${targetOutput2}`
25-
);

0 commit comments

Comments
 (0)