Update script.js

Created getUserAge function in preparation for cookie setting.