JSFiddle - React, Tailwind, and code Playground
HTML
<p id="demo">Click the button to display the length of side b</p>
<button onclick="myFunction()">Try it</button>
<script type="text/javascript">
function myFunction()
{
var B = 30; //size of angle B
var a = 400; //length of side a
var A = 90; //size of angle A
var calculateLength = Math.sin(B/180*Math.PI)*(a/Math.sin(A/180*Math.PI));
document.getElementById("demo").innerHTML=calculateLength;
}
</script>