JSFiddle - React, Tailwind, and code Playground
by ti2005
JavaScript
var tbv = {
maxValue: "cfffdfd"
}
max = 99999;
/* if (isNaN(tbv.maxValue)) {
tbv.maxValue = null;
console.log("First Condtion (isNaN)");
} */
if (tbv.maxValue <= 0) {
tbv.maxValue = null;
/* console.log("Second Condtion (<=0)") */;
} else if (tbv.maxValue > max) {
tbv.maxValue = max;
}
console.log(tbv.maxValue );