Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function Dose() {
var _min = null;
var _max = null;
this.setMin = function(min) {
_min = min;
};
this.setMax = function(max) {
_max = max;
};
this.getMin = function() {
return _min;
};
this.getMax = function() {
return _max;
};
}
Dose.prototype = new Dose();
drug_dose.setMin(1); // OK
drug_dose.setMax('string'); // OK, but does not make sense
drug_dose._min = 1; // OK
drug_dose._max = 'string'; // OK, but does not make sense
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment