html get current year code example
Example 1: Javascript get current year
var currentYear= new Date().getFullYear();
Example 2: javascript code for year in html
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
Example 3: how to get current year in javascript
new Date().getFullYear()
// returns the current year