Udacity unit 3 in Ruby and Javascript