MCPcopy Create free account
hub / github.com/AyushSaini00/60minuteJavaScript / displayAge

Function displayAge

Age-Calculator/app.js:38–54  ·  view source on GitHub ↗
(y,m,d)

Source from the content-addressed store, hash-verified

36}
37
38function displayAge(y,m,d){
39
40 const years = document.getElementById('years');
41 const months = document.getElementById('months');
42 const days = document.getElementById('days');
43
44 years.innerText = y;
45 months.innerText = m;
46 days.innerText = d;
47
48 if(y >= 0){
49 error.style.display = `none`;
50 }
51 if(y < 0){
52 error.style.display = `block`;
53 }
54}
55
56container.addEventListener('input', getAge);

Callers 1

calcAgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected