Step 3

  • 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 fourteen minutes to fall asleep.</p>
<p>If you head to bed right now, you should try to wake up at one of the following times:</p>
<p>11:44 PM or 1:14 AM or 2:44 AM or 4:14 AM or 5:44 AM or 7:14 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:00 PM, and hard-coded here. We will make our app calculate these times dynamically when the zzz button is clicked.