Skip to content

Commit dfbc4d5

Browse files
authored
Update primitives-challenges.md
1 parent a4e2505 commit dfbc4d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

challenges/primitives-challenges.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ str.replaceAll(" ", "_");
189189
### Write a function which can convert the time input given in 12 hours format to 24 hours format
190190
```js
191191
// Example
192-
console.log(convertTo24HrsFormat("12:10AM")); // 00:10
193-
console.log(convertTo24HrsFormat("5:00AM")); // 05:00
194-
console.log(convertTo24HrsFormat("12:33PM")); // 12:33
195-
console.log(convertTo24HrsFormat("01:59PM")); // 13:59
196-
console.log(convertTo24HrsFormat("10:8PM")); // 22:08
197-
console.log(convertTo24HrsFormat("10:02PM")); // 22:02
192+
convertTo24HrsFormat("12:10AM"); // 00:10
193+
convertTo24HrsFormat("5:00AM"); // 05:00
194+
convertTo24HrsFormat("12:33PM"); // 12:33
195+
convertTo24HrsFormat("01:59PM"); // 13:59
196+
convertTo24HrsFormat("11:8PM"); // 23:08
197+
convertTo24HrsFormat("10:02PM"); // 22:02
198198
```
199199

200200
- The check for 'AM' and 'PM' can be verified using `endsWith` String method

0 commit comments

Comments
 (0)