Metoda getSeconds
Metoda getSeconds aplikohet në
një objekt me datë
dhe kthen vlerën aktuale të sekondave
(një numër nga 0 në 59).
Sintaksa
data.getSeconds();
Shembull
Le të shfaqim numrin aktual të sekondave:
let data = new Date();
let rez = data.getSeconds();
console.log(rez);
Shihni gjithashtu
-
metoda
getHours,
e cila merr orët -
metoda
getMinutes,
e cila merr minutat -
metoda
getSeconds,
e cila merr sekondat -
metoda
getMilliseconds,
e cila merr milisekondat