JavaScript otrzyma bieżący rok
var currentYear= new Date().getFullYear();
Grepper
var currentYear= new Date().getFullYear();
new Date().getFullYear(); // This will get you the current year
getFullYear()
const moonLanding = new Date('July 20, 69 00:20:18');
console.log(moonLanding.getFullYear());
// expected output: 1969