how to current year in js code example Example: how to get the year in javascript Click to copynew Date().getFullYear(); // This will get you the current year