Following program shows you how to take birth year and tells age.
In this program we get birth year from user and tells their age using
currentYear - birthYear
var birthYear = prompt("Please enter your date of birth:"); var age = new Date().getFullYear() - birthYear; console.log("Your age is " + age);
Please enter your date of birth: 1990 Your age is 28
On By Navya
Getting 'No EntityManager with actual transaction available for current thread' exception while removing some data
How to fix Found use of deprecated [org.hibernate.id.SequenceGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead