/prepbytes-clock-javascript

This is a digital clock created utilizing HTML,CSS and Javascript.

Primary LanguageHTML

Prepbytes-clock-javascript

This is a digital clock created utilizing HTML,CSS and Javascript.

This project utilizes the Date() object used to procure time and give alarm screen notifications in real time. It's fully responsive which is achieved through implementing media queries to the web design.

What I learnt during this project

Usage of the Date() object which allows us to retreive values for hours, minutes, seconds, months and so on... in real time.

Syntax

  //object for date method
  let obj=new Date();
  let h=obj.getHours(); //For hours
  let m=obj.getMinutes();  //For minutes
  let s=obj.getSeconds();  //For seconds

Since we've created a digital clock, we'll only use hours, minutes and seconds for this. For more detailed and succint information you can use these resources:

  1. W3 Schools (https://www.w3schools.com/js/js_dates.asp)
  2. MDN Mozilla developer documentation (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)

Desktop design

image

Mobile design

image

Website URL

https://digi-clock-alarm.netlify.app/