Validating Javascript Model
I prefer to create isValid() method instead of exceptions and getValidationErrors() to get array of all errors instead of one error message with exception.

var joel = new Person('Joel', 30);
if( ! joel.isValid() ) {
    console.log(joel.getValidationErrors());
}


Also you can create some validation function like

validate({
    name: {
        type: 'string'
    },
    age: {
        type: 'number',
        minValue: 0,
        maxValue: 150
    }
}, {
    name: firstName,
    age:  age
});


Which will return array of errors. If array length is 0 then validation passed.