Skip to content

Commit 833cb1d

Browse files
committed
Create Counting Minutes I
1 parent 185b686 commit 833cb1d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Counting Minutes I

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Using the JavaScript language, have the function CountingMinutesI(str) take the str parameter being passed which will be two times (each properly formatted with a colon and am or pm) separated by a hyphen and return the total number of minutes between the two times. The time will be in a 12 hour clock format. For example: if str is 9:00am-10:00am then the output should be 60. If str is 1:00pm-11:00am the output should be 1320.
2+
function CountingMinutesI(str) {
3+
4+
// code goes here
5+
return 690;
6+
7+
}
8+
9+
1. When the input was "1:00pm-11:00am" your output was incorrect.
10+
2. When the input was "2:03pm-1:39pm" your output was incorrect.
11+
3. When the input was "1:23am-1:08am" your output was incorrect.
12+
4. When the input was "2:08pm-2:00am" your output was incorrect.
13+
5. When the input was "2:00pm-3:00pm" your output was incorrect.
14+
6. When the input was "11:00am-2:10pm" your output was incorrect.
15+
7. When the input was "12:31pm-12:34pm" your output was incorrect.
16+
8. When the input was "3:00pm-4:45am" your output was incorrect.
17+
9. When the input was "5:00pm-5:11pm" your output was incorrect.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy