JSFiddle - React, Tailwind, and code Playground
JavaScript
let qty = 5;
let max = 3;
max = max - qty;
if ( max >= 0 ) {
console.debug('continue');
} else {
console.debug('find difference', qty + max);
}
let qty = 5;
let max = 3;
max = max - qty;
if ( max >= 0 ) {
console.debug('continue');
} else {
console.debug('find difference', qty + max);
}