Update index.js

This commit is contained in:
zyqunix 2025-06-06 00:55:23 +02:00 committed by GitHub
parent 127b465310
commit d66987b66b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@ const updateAge = () => {
const now = new Date();
const diff = now.getTime() - birthday.getTime();
age = diff / (1000 * 60 * 60 * 24 * 365.25);
ageElem.innerHTML = `${age.toFixed(2)} years old`;
ageElem.innerHTML = `${age} years old`;
}
updateAge();