Step 2
- Add the following to the
<body>
element.
<p>If you go to bed NOW, you should wake up at...</p>
<button>zzz</button>
- Add the response which we want to see after clicking on
zzz
button, after<button>zzz</button>
.
<p>It takes the average human 14 minutes to fall sleep.</p>
<p>
If you head to bed right now, you should try to wake up at one of the
following times:
</p>
<p>
12:15 AM<br />
1:45 AM<br />
3:15 AM<br />
4:45 AM<br />
6:15 AM<br />
7:45 AM
</p>
<p>A good night's sleep consists of 5-6 complete sleep cycles.</p>
The wake-up times are calculated for someone going to bed at 10:30 PM, and hard-coded here. We will make our app calculate these times dynamically when the
zzz
button is clicked.