JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" value="0" name="qty" id="qty">
JavaScript
var cubes=123.2;
$("#qty").val(cubes);
var test=$("#qty").val();
alert(test);
<input type="text" value="0" name="qty" id="qty">
var cubes=123.2;
$("#qty").val(cubes);
var test=$("#qty").val();
alert(test);