Wednesday, January 23, 2019

Digital clock

Yeah, still pretty basic stuff, but I had some issues with making those template literals work. Also, I found out that in JavaScript, days of the week start with Sunday being at the index position of 0.

There was also a string variable named period, which would change despite if it was AM or PM time, but I later dismissed it since the clock is based on European standard.

edit: fixed an issue where clock showed 12 insted of 00 hours.



Github link

No comments:

Post a Comment