problem with mathf.tan

can i calculate the angle with its tangent in a java script?

It's fairly simple: Mathf.Tan(angle).

print (Mathf.Tan(0.5));

Note that the angle must be Radians, so if you have a value in Degrees, you need to convert, like this:

var deg = 45;
var rad = deg * Mathf.PI / 180;
print (Mathf.Tan(rad));

Yes, you should find that Mathf.Tan works as expected. Be careful that you have capitalised it properly, and remember that the angles are given in radians for the maths functions.

If you're having a particular problem, please give more detail.