Add a new way to make objects in javascript