JSFiddle - React, Tailwind, and code Playground
HTML
<input type="number" id="min" value="50">
<input type="number" id="max" value="150">
JavaScript
let min = document.getElementById("min").value;
let max = document.getElementById("max").value;
console.log(max , min);
if (max < min) {
console.log("WTF");
} else {
console.log("not so WTF");
}