Consider the following triangle:

I want to calculate the angle X
I have the following:
var opposite = 2.5;
var hypotenuse = 5;
var sinOfAngleX = opposite / hypotenuse;
So now I know what Math.sin(valueofAngleX)will return 0.5.
But how do I get the angle value if I know the sine of the angle using the Math () library?
According to this tutorial , I need to do:
var angleX = sin to the power of negative one of 0.5
but I don’t know how to translate this to JS.
I tried:
var angleX = Math.pow(Math.sin(sinOfAngleX), -1);
but it returns 2.085829642933488 , which is obviously incorrect. The correct answer should be 30
And in case all of the above is wrong for a start, does anyone know how I can correctly calculate the angle X using the JS Math () library?
Thank!