var date1 = '01/01/1988';
var date2 = '01/01/2008';
var date = new Date();
date.setTime(Date.parse(date1));
var year1 = date.getFullYear();
date.setTime(Date.parse(date2));
var year2 = date.getFullYear();
var age = year2 - year1;
alert('Your age: '+ age);