File tree Expand file tree Collapse file tree 2 files changed +36
-4
lines changed Expand file tree Collapse file tree 2 files changed +36
-4
lines changed Original file line number Diff line number Diff line change 1- //percentage exercise
1+ function to24hourtime ( hour , minute , period ) {
2+ //if the period is pm then add 12 to hours.
23
3- const decimalNumber = 0.5 ;
4+ if ( ( hour = "12" ) && ( minute = "00" ) ) {
5+ return "0000" ;
6+ }
7+ }
48
5- const percentage = `${ decimalNumber * 100 } %`
9+ //for hours and minute make sure they are in 3 digit.
10+ //return the hours and minute as a 4 char string.
611
7- console . log ( percentage ) ;
12+ // hour will always range from 1 to 12 (inclusive)
13+ // minute will always range from 0 to 59 (inclusive)
14+ // period will always be either "am" or "pm"
15+
16+ console . log ( to24hourtime ( ) ) ;
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 " />
5+ < meta
6+ name ="viewport "
7+ content ="width=device-width, initial-scale=1.0 "
8+ />
9+ < title > Test Page</ title >
10+ </ head >
11+
12+ < body >
13+ < h1 > Hello, World!</ h1 >
14+ < p > This is a test page.</ p >
15+ < p > Testing 123...</ p >
16+ < p > Another paragraph for testing.</ p >
17+ < h2 > Subheading</ h2 >
18+ < p > More content goes here.</ p >
19+ < footer >
20+ < p > Footer content</ p >
21+ </ footer >
22+ </ body >
23+ </ html >
You can’t perform that action at this time.
0 commit comments