JSFiddle - React, Tailwind, and code Playground

by mpsingh2003

HTML

<output id="output">

</output>

JavaScript

var min = 0;
var max = 100;

if (newVal < min)
  newVal = min;
if (newVal > max)
  newVal = max;

var newVal = 50;

console.log(newVal)


document.getElementById("output").textContent = `newVal is: ${newVal}`