JSFiddle - React, Tailwind, and code Playground

HTML

CREDIT:
<input type="text" id="credit" />
<br/>USD:
<input type="text" id="usd" />

JavaScript

$("#credit").change(function () {
    $("#usd").val((parseInt($("#credit").val(), 10) * 2));
});