1 2 3 4 5
(function(){ var el = document.getElementById('y'); if (!el) return; el.textContent = String(new Date().getFullYear()); })();