Using Date Methods to Handle Dates in Javascript


Manipulate dates using Date object methods like setFullYear(), getMonth(), etc.

Source Code

let date = new Date();
date.setFullYear(2024);
console.log(date.getFullYear());
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments