Re-doing some ruby exercises form week 1 in javascript to learn the differences between languages.