An example of a JavaScript prototype A simple Animal object factory implemented as both a Ruby class and a JavaScript prototype for comparison/learning. See my blog post for a detailed walk-through.