Skip to content

Commit 0d11d74

Browse files
committed
changed html title using js queryselector
1 parent ed3d3cc commit 0d11d74

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Sprint-3/alarmclock/alarmclock.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const title = document.querySelector('title')
2+
title.textContent = "Alarm clock app";
13
function time_convert(num) {
24
let minutes = Math.floor((num % 3600) / 60);
35
let seconds = num % 60;
@@ -12,7 +14,7 @@ function setAlarm() {
1214

1315
// ## How the clock should work
1416

15-
// When you click the `Set Alarm` button the counter at the top of the screen should change to the number you entered in the `input` field. For example, if the `input` field says `10` then the title should say `Time Remaining: 00:10`.
17+
// When you click the `Set Alarm` button the counter at the top of the screen should change to the number you entered in the `input` field. For example, if the `input` field says `10` then the title should say `Time Remaining: 00:10`. => Done
1618

1719
// Every one second the title should count down by one.
1820

Sprint-3/alarmclock/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<link rel="stylesheet" href="style.css" />
7-
<title>Alarm clock app</title>
7+
<title>Title here</title>
88
</head>
99
<body>
1010
<div class="centre">
@@ -19,4 +19,3 @@ <h1 id="timeRemaining">Time Remaining: 00:00</h1>
1919
</body>
2020
</html>
2121

22-

0 commit comments

Comments
 (0)