JSFiddle - React, Tailwind, and code Playground

HTML

<button type="button" id="allocate">Calc</button>

JavaScript

$('#allocate').click(function () {
     val1 = 25.00;
     val2 = 16.37;
     val3 = val1-val2;
     alert(val3);
 });