How to get the Current Year in JavaScript

Use Date() and getFullYear().

new Date().getFullYear()

Example:

<script>
    var now = new Date();
    var year = now.getFullYear();

    console.log(year);
</script>