What is the best way to go about creating javascript classes so that objects can be created by passing in object literals, and at the same time maintaining defaults set in the class.
var brett = new Person({
name: 'Brett'
,age: 21
//gender: 'male' //The default is female, so brett.gender will be female
});