Created
March 24, 2016 18:01
-
-
Save maciejlew/b9e745708bff98539826 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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