age distribution in javascript