JavaScript Essentials: The Date Object

preview_player
Показать описание
In this tutorial, you'll learn about the JavaScript Date Object and how you can use it to get the time and date.

A lot of programming languages provide you with convenient, in-built functions which tell you the current date and time. In JavaScript it's a little more complex.

You first of all need to construct a new date object using the new keyword that you learnt about in the previous JavaScript essentials lesson on Classes.

Once you have create a JavaScript date object, you need to access the various built-in functions of the object to extract the information you need, for example the hours minutes and seconds of the time or the current date.

At the end of the tutorial, we'll wrap up by talking about JavaScript timestamps which is a large, whole number which represents the number of milliseconds that have passed since the Unix epoch. Channel Handle @codebubb
Рекомендации по теме
welcome to shbcf.ru