0
Date of birtg calculator
a code that takes the age of someone and calculates the year of birth
1 Answer
+ 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));