Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Challenge 1: Your Age in Days
- function calculateAgeInDays() {
- var birthYear = prompt('What year were you born?');
- var ageInDays = (2018 - birthYear) * 365;
- console.log(ageInDays);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement