Dating for the Ages
An interesting tweet came across my Twitter stream regarding dating. For the nerds out there, i thought I’d include a little Javascript to show how to create a lookup table. I started by setting up the main loop to start when your age is 18 and goes up thru the age of retirement. Hopefully, by the time you retire, you won’t have to worry about dating anymore. :) Just to make sure were keeping things legal I added an check to ensure they’re the age of consent. That’s 18 in most US states.
<script type="text/javascript"> out = "Your Age => Their Minimum Age\n"; out += "----------------------------\n"; for (ya = 18; ya <= 65; ya++){ ta = (ya / 2) + 7; if (ta >= 18){ // keep it legal out += " " + ya + " => " + ta + " \n"; } } alert(out); </script>
As a bonus I’ve put this script into a link so you use this from your toolbar. Just drag the link to your browser toolbar to show Dating Age table.