Experiment with different object patterns in JavaScript