How to get today hour, minute, and second by javascript

Please check the below codes:

var today = new Date();

if you want to get the hour:

var hour = today.getHours(); 

if you want to get the today minute use:

var minute = today.getMinutes();

if you want to get the today’s second use:

var second = today.getSeconds();