0

Date of birtg calculator

a code that takes the age of someone and calculates the year of birth

20th Jul 2017, 7:13 AM
Njoroge David
Njoroge David - avatar
1 Antwort
+ 1
In JavaScript: function dob(age){ var d = new date(); return d.getFullYear() - age; } var input = prompt("Enter your age:"); alert("You were born in: " + dob(input));
20th Jul 2017, 11:37 AM
James
James - avatar