JSFiddle - React, Tailwind, and code Playground
HTML
<input type="range" id="x" step="10">
<output id="o"></output>
JavaScript
x.oninput = () => {
let num = x.value
switch (true) {
case (num > 60):
o.textContent = "Нет, переменная меньше 60"
break;
case (num < 40):
o.textContent = "Нет, переменная больше 40"
break;
case (num == 50):
o.textContent = "Да, переменная ровна 50"
break;
}
}