Maximum number of line intersections formed through intersection of N planes | Function to count maximum number of intersections possible ; Driver Code
function countIntersections ( n ) { return n * ( n - 1 ) / 2 ; } var n = 3 ; document . write ( countIntersections ( n ) ) ;