javascript example code that makes use of objects.