This is a 30-60-90 triangle. With this special template, the hypotenuse is always twice as long as the shorter leg. Put another way: the shorter leg is half as long as the hypotenuse. So the shorter leg is 4/2 = 2 units long.
The longer leg is equal to sqrt(3) times the short leg. The long leg is 2*sqrt(3) units long which is the final answer.