javascript get todays year code example Example: how to get current year in javascript new Date().getFullYear() // returns the current year