Ive been trying to calculate the age of someone in Javasript by taking their d.o.b from a drop down calender where its alerts to - say ur birthday is and you are " " years old

Ive tried a few different ways of doing this and had no joy, i can only get the first alert to work and then its saying age is undefined .

Was wondring if someone could please help.