What is the formula for calculating the volume of a triangular prism?

The volume of a three-dimensional figure is the amount of space it encloses.

The volume V of a triangular prism is the product of the area B of a base and the height h of the prism. (The bases are triangles. In a special case of a right triangular prism the bases are right triangles)