0
0
Fork 0

Make app function.

This commit is contained in:
Tyler-A 2020-07-05 18:14:59 -06:00
parent e4c81beefe
commit af75bbc522
14 changed files with 865 additions and 0 deletions

19
js/text_computation.js Normal file
View file

@ -0,0 +1,19 @@
function get_button_text () {
if (this.count === ``) {
return this.type;
}
else if (this.count === `1`) {
this.error.main = ``;
return this.type.slice(0,-1);
}
else if (this.count <= 0) {
this.error.main = `Cannot get 0 or fewer ${this.type.toLowerCase()}`;
return false;
}
else if (this.count > 50) {
this.error.main = `Cannot get more than 50 ${this.type.toLowerCase()}`;
return false;
}
this.error.main = ``;
return this.type;
};