How to create objects in JavaScript